Stream logs to a SIEM
Your SIEM pulls tool call and API request logs from two endpoints. Gateway pushes LLM call logs to it over OTLP.
Tool call and API request logs
The log endpoints are an Enterprise feature. If they’re not enabled, they return 403. Contact your account team.
First poll, then pass the cursor on every later poll:
The response has results, next_cursor, and has_more. Persist the last next_cursor and resume from it. Run one loop per endpoint, each with its own cursor. Dedup downstream by record ID, since retries can resend a page.
Set up your SIEM
Datadog
Splunk
Microsoft Sentinel
Elastic
Cribl Stream
Sumo Logic
Other platforms
Datadog can’t pull, so run a scheduled job that pages the endpoint and POSTs results to the Logs intake.
- Intake:
https://http-intake.logs.datadoghq.com/api/v2/logs, or the host for your Datadog site - Auth header:
DD-API-KEY: <Datadog API key> - Persist
next_cursoronly after a batch is accepted
Run a scheduled script that pages the endpoint and POSTs each record to the HTTP Event Collector (HEC).
- Enable HEC under Settings → Data Inputs → HTTP Event Collector (port
8088) and create a token - POST to
https://<splunk-host>:8088/services/collector/eventwithAuthorization: Splunk <HEC_TOKEN>
Checkpoint on a created_after timestamp between runs, and use the cursor to page within a run.
Use a Codeless Connector Framework RestApiPoller connection rule:
Set ApiKeyIdentifier to Bearer; the default token gets a 401. Keep InitialCheckpointTimeUtc within 90 days.
Use the httpjson input (the Custom API integration in Fleet):
Don’t put a default: on the pagination cursor, or the input loops forever.
Add a REST Collector under Data → Sources → Collectors:
Add a Universal Connector source to a Hosted Collector:
Run a scheduled job per endpoint:
- Read the saved
cursor, or setcreated_afterwithin 90 days on the first run GETthe endpoint withAuthorization: Bearer <PRODUCTION_KEY>andpage_size=1000- Send
results[]to your platform’s intake - Save
next_cursor. Repeat whilehas_moreistrue.
LLM calls from AI Gateway
Gateway pushes each model request as an OpenTelemetry span over OTLP/HTTP. Export covers only requests made after you create a destination. Spans carry the model, provider, token counts, and cost.
Set up a destination in the Gateway console under Settings → Telemetry export:
For a platform without an OTLP/HTTP receiver, run an OpenTelemetry Collector in between. This one forwards to Splunk HEC:
In the Gateway console, choose Custom OTLP endpoint, enter the Collector’s base URL (https://otel.acme.com), and use GATEWAY_EXPORT_TOKEN as the bearer token. Gateway appends /v1/traces. The endpoint must be public HTTPS with no redirects.
Privacy mode is on for new destinations and strips prompt and completion content. It is separate from payload logging. Export fails silently, so alert in your SIEM when spans stop arriving.