Export to Datadog

Forward Prism Gateway logs and metrics from Future AGI to Datadog automatically.

📝
TL;DR

Connect your Datadog account and Future AGI will push Prism Gateway request logs and aggregated metrics on every sync cycle. Logs land in Datadog Logs, metrics land in Datadog Metrics.

What this does

This integration exports your Prism Gateway traffic to Datadog. Every API call that flows through the gateway (model requests, cache hits, guardrail triggers, routing decisions) gets forwarded as a structured log with tags. Aggregated metrics (request counts, error rates, latency, token usage, cost) are sent alongside.

Once in Datadog, you can build dashboards, set up monitors, search logs, and alert on anomalies using data from your LLM gateway.

What gets exported

Logs

Each Prism Gateway request becomes a Datadog log entry with:

FieldExampleDescription
message[openai] gpt-4o status=200 latency=842ms tokens=1523 cost=$0.02One-line summary
statusinfo or errorBased on whether the request errored
attributes.modelgpt-4oModel used
attributes.provideropenaiProvider
attributes.latency_ms842End-to-end latency
attributes.input_tokens1200Prompt tokens
attributes.output_tokens323Completion tokens
attributes.cost0.02Cost in USD
attributes.cache_hittrueWhether the response was cached
attributes.guardrail_triggeredfalseWhether a guardrail fired

Tags applied to every log: model, provider, status_code, gateway, error, cache, guardrail, routing. Use these for filtering and faceting in Datadog.

Metrics

Aggregated per sync interval under the prism.gateway.* namespace:

MetricTypeDescription
prism.gateway.requestscountTotal requests in the window
prism.gateway.errorscountFailed requests
prism.gateway.latency_msgaugeAverage latency
prism.gateway.input_tokenscountTotal prompt tokens
prism.gateway.output_tokenscountTotal completion tokens
prism.gateway.costcountTotal cost in USD

Before you start

You’ll need:

  • A Datadog account (any plan, including free tier)
  • A Datadog API key, found in Datadog > Organization Settings > API Keys
  • Optionally, an Application Key if you want Future AGI to create dashboard templates
  • Admin or Owner role in your Future AGI workspace
  • The Prism Gateway set up and receiving traffic

Note

Know which Datadog site/region your account is on (US1, US3, US5, EU1, AP1, or US1-FED). The integration needs this to send data to the right endpoint.


Connect Datadog

Open Integrations

Go to Settings > Integrations in your Future AGI workspace. Click Add Integration or click the Datadog card in the Available Platforms grid.

Integrations list page

Enter your Datadog credentials

On the Credentials step, fill in:

FieldRequiredDescription
Datadog SiteYesThe region your Datadog account is in. Defaults to US1 (datadoghq.com).
API KeyYesYour Datadog API key.
Application KeyNoNeeded only for dashboard template creation.

Datadog credentials form

Click Validate & Continue.

Configure sync settings

Set the sync interval and historical data option.

Sync Interval controls how often Future AGI batches and sends data to Datadog. Every 5 minutes works for most setups. Use 1-2 minutes if you need near real-time visibility.

Historical Data lets you backfill past gateway logs into Datadog, or start fresh with only new traffic going forward.

Datadog sync settings

Click Connect Integration.

Done

Data starts flowing to Datadog on the next sync cycle. Head to Datadog to verify.


Verify in Datadog

Once the first sync completes:

  • Logs: Go to Datadog > Logs and search for source:futureagi or filter by tags like model:gpt-4o
  • Metrics: Go to Datadog > Metrics Explorer and search for prism.gateway.requests

If nothing shows up after 10 minutes, check the sync status in Settings > Integrations and look at the sync history for errors.


Sync status

Monitor your integration from the detail page (Settings > Integrations > click your Datadog connection).

StatusMeaningAction
ActiveExporting on scheduleNone needed
SyncingA batch is being sent right nowWait for it to finish
PausedYou paused the export manuallyClick Resume when ready
ErrorAPI key revoked or Datadog rejected the requestCheck your API key and Datadog site region

Troubleshooting

No logs appearing in Datadog

Check that you selected the correct Datadog site/region. US1 (datadoghq.com) is the default, but if your account is on EU1 (datadoghq.eu) or another region, logs are being sent to the wrong endpoint. Edit the integration and change the site.

Logs appear but metrics are missing

Metrics are only sent when there’s at least one request in the sync window. If your gateway had no traffic during a cycle, no metrics are emitted. Check that the Prism Gateway is actively receiving requests.

Connection shows Error status

This usually means your Datadog API key was revoked or is invalid. Generate a new API key in Datadog > Organization Settings > API Keys, then edit the integration to update it.

High latency or delayed data

Logs are sent in batches of 500. If your gateway handles thousands of requests per minute, the sync cycle takes longer to complete. This is normal for high-volume setups. If the delay is a problem, increase the sync interval so each cycle covers a shorter window.


What’s next

Was this page helpful?

Questions & Discussion