Grafana Cloud is a fully-managed observability platform that includes Grafana Tempo for distributed tracing. OpenRouter sends traces via the standard OTLP HTTP/JSON endpoint.
You’ll need three values from your Grafana Cloud portal:
https://otlp-gateway-prod-us-west-0.grafana.net)123456)glc_...)The base URL should be the OTLP gateway endpoint, not your main Grafana dashboard URL. The format is https://otlp-gateway-prod-{region}.grafana.net.
https://grafana.com/orgs/{your-org}/stackstraces:write scopeglc_...)Go to Settings > Observability and toggle Enable Broadcast.

Click the edit icon next to Grafana Cloud and enter:
https://otlp-gateway-prod-us-west-0.grafana.net)
Click Test Connection to verify the setup. The configuration only saves if the test passes.

Make an API request through OpenRouter and view the trace in Grafana Cloud.

Once configured, you can view traces in Grafana Cloud in two ways:
https://your-stack.grafana.net)grafanacloud-*-traces)You can also filter by specific attributes:
OpenRouter traces include the following key attributes:
service.name: Always openrouterservice.version: 1.0.0openrouter.trace.id: The OpenRouter trace IDgen_ai.operation.name: The operation type (e.g., chat)gen_ai.system: The AI provider (e.g., openai)gen_ai.request.model: The requested modelgen_ai.response.model: The actual model usedgen_ai.usage.input_tokens: Number of input tokensgen_ai.usage.output_tokens: Number of output tokensgen_ai.usage.total_tokens: Total tokens usedgen_ai.response.finish_reason: Why the generation ended (e.g., stop)Any metadata you attach to your OpenRouter requests will appear under the trace.metadata.* namespace. See Custom Metadata below for details.
Grafana Cloud receives traces via the OTLP protocol. Custom metadata from the trace field is sent as span attributes and can be queried using TraceQL.
Custom metadata keys are available as span attributes under trace.metadata.*:
user field maps to user.id in span attributessession_id field maps to session.id in span attributestrace appear under the trace.metadata.* namespace in span attributeshttps://otlp-gateway-prod-{region}.grafana.net), not your main Grafana URL.If you don’t see any traces, make sure you’ve selected the correct Tempo data source in the Explore view. It’s typically named grafanacloud-{stack}-traces.
When Privacy Mode is enabled for this destination, prompt and completion content is excluded from traces. All other trace data — token usage, costs, timing, model information, and custom metadata — is still sent normally. See Privacy Mode for details.