SigNoz Cloud - This page is relevant for SigNoz Cloud editions.
Self-Host - This page is relevant for self-hosted SigNoz editions.

OpenRouter Observability & Monitoring with OpenTelemetry

Overview

This guide walks you through setting up observability and monitoring for OpenRouter using OpenTelemetry and exporting traces to SigNoz. With this integration, you can observe and track various metrics for your OpenRouter applications and llm usage.

Monitoring OpenRouter in your AI applications with telemetry ensures full observability across your AI and LLM workflows. By leveraging SigNoz, you can analyze correlated traces, logs, and metrics in unified dashboards, configure alerts, and gain actionable insights to continuously improve reliability, responsiveness, and user experience.

Prerequisites

Monitoring OpenRouter

Step 1: Configure broadcasting traces from OpenRouter to OTel Collector

For more information on setting up traces from OpenRouter refer to the OpenRouter broadcast guide.

Enable Broadcast in OpenRouter

Go to Settings > Observability and toggle Enable Broadcast.

OpenRouter Enable Broadcast Toggle
OpenRouter Enable Broadcast Toggle

Configure OpenTelemetry Collector

Click 'Add Destination +' next to the OpenTelemetry Collector entry

OTel Collector Add Destination
OpenTelemetry Collector Add Destination

and enter:

  • Endpoint: https://ingest.<region>.signoz.cloud:443/v1/traces
  • Headers:
{
  "signoz-ingestion-key": "<your-ingestion-key>"
}
OTel Collector Add Details
OpenTelemetry Collector Add Details
Info

For self-hosted collector:

  1. Deploy your OpenTelemetry Collector with an OTLP receiver
  2. Configure the receiver to listen on a publicly accessible endpoint
  3. Add the endpoint URL
  4. Remove the ingestion key header as shown in Cloud → Self-Hosted.

Test and Save

Click Test Connection to verify the setup. Once there is a success message, click the "Add" button.

Your OpenRouter calls should now be traced and sent to SigNoz.

Step 2: Use the OpenRouter API

For more information on getting started with OpenRouter in your environment, refer to the OpenRouter quickstart guide.

import requests
import json

response = requests.post(
  url="https://openrouter.ai/api/v1/chat/completions",
  headers={
    "Authorization": "Bearer <OPENROUTER_API_KEY>",
    "HTTP-Referer": "<YOUR_SITE_URL>", # Optional. Site URL for rankings on openrouter.ai.
    "X-Title": "<YOUR_SITE_NAME>", # Optional. Site title for rankings on openrouter.ai.
  },
  data=json.dumps({
    "model": "openai/gpt-5.2", # Optional
    "messages": [
      {
        "role": "user",
        "content": "What is SigNoz?"
      }
    ]
  })
)

View Traces in SigNoz

Your OpenRouter agent usage should now automatically emit traces.

You should be able to view traces in SigNoz Cloud under the traces tab:

OpenRouter Trace View
OpenRouter Trace View

When you click on a trace in SigNoz, you'll see a detailed view of the trace, including all associated spans, along with their events and attributes.

OpenRouter Detailed Trace View
OpenRouter Detailed Trace View

Troubleshooting

If you don't see your telemetry data:

  1. Verify network connectivity - Ensure your application can reach OpenRouter API and SigNoz Cloud endpoints
  2. Check ingestion key - Verify your SigNoz ingestion key is correct
  3. Wait for data - OpenTelemetry batches data before sending, so wait 10-30 seconds after making API calls

Next Steps

You can also check out the OpenRouter Dashboard Template which provides specialized visualizations for monitoring your OpenRouter usage in applications. The dashboard includes pre-built charts specifically tailored for LLM usage, along with import instructions to get started quickly.

OpenRouter Dashboard
OpenRouter Dashboard Template

Setup OpenTelemetry Collector (Optional)

What is the OpenTelemetry Collector?

Think of the OTel Collector as a middleman between your app and SigNoz. Instead of your application sending data directly to SigNoz, it sends everything to the Collector first, which then forwards it along.

Why use it?

  • Cleaning up data — Filter out noisy traces you don't care about, or remove sensitive info before it leaves your servers.
  • Keeping your app lightweight — Let the Collector handle batching, retries, and compression instead of your application code.
  • Adding context automatically — The Collector can tag your data with useful info like which Kubernetes pod or cloud region it came from.
  • Future flexibility — Want to send data to multiple backends later? The Collector makes that easy without changing your app.

See Switch from direct export to Collector for step-by-step instructions to convert your setup.

For more details, see Why use the OpenTelemetry Collector? and the Collector configuration guide.

Additional resources:

Last updated: February 20, 2026

Edit on GitHub