Set up Bifrost Beta
Bifrost sends traces with its otel plugin. Add the snippet below to your config to enable tracing. Verified on Bifrost v2.5.1.
1. Find your project secret
- Sign in to WildEdge and open the project that should receive the events.
- Open API Keys and select Reveal DSN on a project key.
The DSN looks like this:
https://<secret>@ingest.wildedge.dev/<key>The part between https:// and @ is your project secret. You need only the secret.
Protect the secret
Anyone with the secret can send events to your project. Keep it in your secret store, not in source control. Use a separate project key for the gateway, so you can revoke it without affecting your apps.
2. Add the otel plugin
Add the plugin to the plugins list in Bifrost's config.json, then restart Bifrost:
"plugins": [
{
"enabled": true,
"name": "otel",
"config": {
"service_name": "bifrost",
"collector_url": "https://ingest.wildedge.dev/api/otlp/v1/traces",
"trace_type": "genai_extension",
"protocol": "http",
"headers": { "X-Project-Secret": "<secret>" },
"disable_content_logging": true
}
}
]collector_urlis the full traces URL, including/v1/traces.trace_typemust begenai_extension. It follows the OpenTelemetry GenAI conventions, which WildEdge reads.protocolmust behttp. WildEdge doesn't accept OTLP over gRPC.- To keep the secret out of
config.json, set the header value to"env.WILDEDGE_PROJECT_SECRET"and put the secret in that environment variable. disable_content_logging: trueleaves prompt and response text out of the export, and tool names too. If you turn it off, WildEdge keeps the end of the prompt and the start of the response as the event's input and output summaries.service_namenames the gateway in your traces. Use any name you like.- Leave
metrics_enabledoff. WildEdge accepts traces only.
3. Check that events arrive
Send one request through Bifrost:
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "openai/gpt-4o-mini", "messages": [{"role": "user", "content": "Hello"}]}'Use your Bifrost address and a provider and model you configured in it.
Open Events in WildEdge. Events appear within a few minutes, one inference event per provider attempt.
What you get
gatewayisbifrost, andmodel_provideris the provider that served the attempt, for exampleopenai.- Each provider attempt is its own event, including each retry and fallback.
request_idis Bifrost's request ID, shared by every attempt of one request. A request rescued by a retry or a fallback counts as one successful request. reported_cost_amountis Bifrost's estimate from its price table, in USD, soreported_cost_is_estimatedistrue. Bifrost reports a cost of 0 for models missing from that table, and no cost for failed calls. WildEdge records both as unknown.- Failed attempts record the provider's HTTP status and error code, for example a
429when the provider rate limits. - Time to first token is recorded on streamed calls.
- MCP tool calls, from Agent Mode,
/v1/mcp/tool/executeor the/mcpgateway, appear in the trace as tool spans.
See Query gateway events for the columns and an example query.
Known limitations
- Chat and text completions only. Embeddings, speech, transcription and image calls aren't recorded.
- Cache hits. Bifrost's cache answers without calling a provider and exports no model call, so cache hits don't appear.
- Tool names. With
disable_content_logging: true, Bifrost leaves tool names out, so tool calls appear asunknown, with their MCP server.
Retries
Bifrost doesn't retry. It sends each request's trace once, with a 5 second timeout. Set export_timeout in the plugin config to change it, up to 60. After 5 failures in a row it stops sending for 30 seconds.
Troubleshooting
If Bifrost requests succeed but no events appear, look for failed to emit trace in Bifrost's logs. See status codes for what each HTTP status means.
Next
- Investigate events and traces, or connect your AI agent to do it for you.
- Also using a WildEdge SDK? Follow App + gateway so each call is recorded once.