Audit log streaming
Devhub can send its audit log to your SIEM as it happens. Each executed query becomes one JSON audit event, POSTed to an HTTPS endpoint you choose, a minute or two after the query finishes.
Who can set it up
Only a super admin can see, change or stop the stream. A stream sends every member's activity out of Devhub, so managers and members with Audit log viewer can't set one up. Managers see the Integrations page without the Security group.
An Organization has one stream. It carries the whole Organization's executed queries, whoever set it up.
Set it up
- In your SIEM, create a source that accepts JSON over HTTPS. The sections below cover the common ones.
- In Devhub, go to Settings > Integrations and choose Set up on Audit log streaming, under Security.
- Enter the endpoint URL, and the header name and value if your SIEM authenticates with a header.
- Choose Send test event. Devhub sends an event of type
devhub.testand shows the status the endpoint answered with. You can send one before or after saving. - Choose Save.
Devhub sends the queries executed from the moment you save. Queries that ran before are not sent.
The URL must start with https://. Devhub stores the URL and the header value encrypted and never shows them again: the settings show only the host. Some providers put their token in the URL's path, which is why the whole URL is treated as a secret.
RunReveal
Create a Webhook source in RunReveal and copy its URL, for example https://api.runreveal.com/sources/hook/.... If you set a bearer token on the source, use the header name Authorization and the value Bearer <token>.
Splunk HTTP Event Collector
Use the raw endpoint, so Splunk indexes each event as Devhub sends it:
- URL:
https://<your-splunk-host>:8088/services/collector/raw?sourcetype=_json - Header name:
Authorization - Header value:
Splunk <your HEC token>
If indexer acknowledgment is on for the token, add &channel=<any GUID> to the URL.
Datadog
- URL:
https://http-intake.logs.datadoghq.com/api/v2/logs?ddsource=devhub, with the intake host of your Datadog site, for examplehttp-intake.logs.datadoghq.eu - Header name:
DD-API-KEY - Header value: a Datadog API key
Sumo Logic
Create an HTTP Logs & Metrics source and copy its URL. The token is part of the URL, so leave the header name and value empty.
Panther
Create an HTTP log source. Copy its URL, and enter the header name and value of the shared secret or bearer token you chose for the source. Send a test event, then let Panther infer a schema from it or define your own.
Any other endpoint
Devhub sends each event as its own POST with Content-Type: application/json. Any 2xx answer counts as delivered. Devhub gives up after 5 seconds without a connection and 10 seconds without an answer, and does not follow redirects.
The events
Every event shares one envelope, so events from more of Devhub can arrive at the same endpoint later and be told apart by type.
{
"id": "qry_01m58m3vjn09kn1b7t2ftxhm13",
"type": "querydesk.query.executed",
"version": 1,
"occurred_at": "2026-10-18T14:22:09.862551Z",
"organization": { "id": "org_01m58m21tp7hrsm15nj4xha012", "name": "Northwind Platform" },
"actor": {
"type": "user",
"id": "usr_01m58m3vfra51r5wc852tgwt35",
"name": "Ada Lovelace",
"email": "ada@northwind.example"
},
"data": {
"source": "human",
"database": { "id": "db_01m58m3fp94jdavr94y1fzgra9", "name": "orders-prod", "adapter": "postgres" },
"database_user": "orders_rw",
"statement_class": "read",
"statements": ["SELECT * FROM orders WHERE id = 4211"],
"failed": false,
"finished_at": "2026-10-18T14:22:10.104337Z",
"canceled_at": null,
"approvals": [
{
"type": "peer_review",
"user": { "id": "usr_01m58m3vgvtw805vnde7kgq7kc", "name": "Priya Raman", "email": "priya@northwind.example" },
"approved_at": "2026-10-18T14:20:51.795224Z"
}
],
"unredacted_run": false,
"unredacted_columns": [],
"blocked_by_ai_read_only": false
}
}
The envelope
- Name
id- Type
- string
- Description
Unique to the event. For
querydesk.query.executedit is the query's id. Use it to drop a repeat.
- Name
type- Type
- string
- Description
What happened:
querydesk.query.executed, ordevhub.testfor a test event.
- Name
version- Type
- integer
- Description
The version of this type's
data.
- Name
occurred_at- Type
- string
- Description
When it happened, in ISO 8601 UTC. For a query, when it was executed.
- Name
organization- Type
- object
- Description
The
idandnameof the Devhub Organization it happened in.
- Name
actor- Type
- object
- Description
Who did it.
typeisuser, with the person'sid,nameandemail, orservice_account, with the service account'sidandname.
- Name
data- Type
- object
- Description
What the event type says. Empty for
devhub.test.
querydesk.query.executed
Sent for each query in the QueryDesk audit log: every executed query except the ones Devhub runs for itself, such as reading a database's schema.
- Name
source- Type
- string
- Description
Where the query came from:
human,ai_chatfor the in-app AI chat, orai_mcpfor an MCP client.
- Name
database- Type
- object
- Description
The
id,nameandadapterof the database it ran against.
- Name
database_user- Type
- string
- Description
The database login it ran as, which is what your database's own logs show.
- Name
statement_class- Type
- string
- Description
readorwrite, as QueryDesk classified the SQL.
- Name
statements- Type
- array
- Description
The SQL statements as Devhub stored them, the same SQL the audit log shows.
- Name
failed- Type
- boolean
- Description
truewhen the query was refused or errored, the same failures the audit log shows. It is alsotruewhen Devhub saw the run end without hearing how it ended, such as a run in the query view that stopped before it reported. Such a statement may still have taken effect. A canceled query keepsfailed: false, andcanceled_atsays when it was stopped. The error text is never sent.
- Name
finished_at- Type
- string
- Description
When the run ended, in ISO 8601 UTC. Always set, since a query is sent only once it has finished.
- Name
canceled_at- Type
- string
- Description
When a person canceled the run, in ISO 8601 UTC, otherwise
null. Canceling stops the run but does not prove the statement had no effect: the database may have committed it just before.
- Name
approvals- Type
- array
- Description
Every approval on the query given since it was last edited, oldest first. Each has a
type,peer_revieworbypass, the approvinguserandapproved_at. A super admin's review bypass is alwaysbypassand neverpeer_review.
- Name
unredacted_run- Type
- boolean
- Description
truewhen the query was an unredacted run: a person asked to run it once with nothing redacted, and it waited for a peer review or a super admin's review bypass, whichapprovalsnames.
- Name
unredacted_columns- Type
- array
- Description
For an unredacted run, each column data protection would otherwise have redacted, as its
tableandname: the columns the run was allowed to show.failedandcanceled_atsay whether it ran to the end, and an analyze shows a plan, never values. Empty for every other query, and for an unredacted run refused before it was sent. Column names only, never their values.
- Name
blocked_by_ai_read_only- Type
- boolean
- Description
truewhen the query came from the AI on a database set to read-only for AI and was a write, so QueryDesk refused it before sending anything to the database. Such a query also hasfailedset. See what Read only enforces.
Delivery
- In order. Query events go out in the order their queries finished, one at a time, about a minute after each query finishes.
- Once the query finishes. A query is sent once it finishes, so
failedsays how the run ended, and it holds no other query back. A long query goes out after the shorter ones that finished before it. Two are never sent: a query whose Devhub server went down mid-run, and a statement the database skipped because an earlier one in its batch failed. The audit log in Devhub still shows them. - At least once. When the endpoint answers anything but a 2xx, or doesn't answer, Devhub stops and tries again the next minute from the same event. Nothing is skipped, however long the endpoint is down.
- Repeats. If Devhub restarts just after the endpoint accepted an event, it sends that event again with the same
id. Drop repeats onid. - Catching up. Devhub sends one event at a time, for up to 50 seconds each minute, so how many go out a minute depends on how fast the endpoint answers. An endpoint that answers in 100 ms takes about 500 a minute. A long outage or a burst of queries is caught up over the following minutes. While the Organization runs more queries a minute than the endpoint takes, the stream falls further behind, and it catches up once the pace drops.
The card on the Integrations page shows whether the stream is delivering and when the last event arrived. While the endpoint fails, it also shows how many events are waiting. The stream's settings show how many are waiting under Waiting to send and, while the endpoint fails, the status it last answered with.
Replacing the endpoint keeps the events waiting, and they go to the new endpoint. Stopping the stream deletes the saved URL and header value, and the events not yet delivered are not sent. The audit log in Devhub doesn't change either way.
What is never sent
- A database credential's password, or a database's hostname and port.
- Anything a query returned, or the error a failed query gave.
- Comments on a query.
- The stream's own URL and header value, which go only to the endpoint as the request's address and header.
Devhub never reads back the endpoint's response body. The settings show only its status.