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

Monitor LLM Usage with traceloop(OpenLLMetry) and SigNoz

Overview

This guide walks you through integrating SigNoz with traceloop(OpenLLMetry) to gain visibility into your LLM and AI applications. By combining traceloop's specialized LLM instrumentation with SigNoz's observability platform, you can monitor and analyze traces from your AI workloads.

Prerequisites

Integrate SigNoz with traceloop

For more information on getting started with traceloop in your Python environment, refer to the traceloop Quickstart Guide. For more information on integrating SigNoz with traceloop, refer to the traceloop SigNoz Guide.

Step 1: Install the necessary packages in your Python environment.

pip install \
  traceloop-sdk \
  openai
πŸ“ Note

For this guide example, we are using OpenAI, but you can use any LLM provider/framework supported by traceloop.

Step 2: Create an example LLM application (using OpenAI in this example)

main.py
from traceloop.sdk import Traceloop
import os
from openai import OpenAI

Traceloop.init(app_name="<service_name>")

client = OpenAI()

chat_completion = client.chat.completions.create(
    messages=[
        {
            "role": "user",
            "content": "What is SigNoz?",
        }
    ],
    model="gpt-3.5-turbo",
)
print(chat_completion.choices[0].message.content)
  • <service_name>Β is the name of your service
πŸ“ Note

Before running this code, ensure that you have set the environment variable OPENAI_API_KEY with your generated OpenAI API key.

Step 3: Run your application with env variables

Run your application with the following environment variables set. This configures OpenTelemetry to export traces to SigNoz.

TRACELOOP_BASE_URL=https://ingest.<region>.signoz.cloud:443 \
TRACELOOP_HEADERS="signoz-access-token=<your_ingestion_key>" \
<your_run_command>
  • Set the <region> to match your SigNoz Cloud region
  • Replace <your_ingestion_key> with your SigNoz ingestion key
  • Replace <your_run_command> with the actual command you would use to run your application. In this case we would use: python main.py
βœ… Info

Using self-hosted SigNoz? Most steps are identical. To adapt this guide, update the endpoint and remove the ingestion key header as shown in Cloud β†’ Self-Hosted.

View Traces in SigNoz

Your AI usage should now automatically emit traces.

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

Traceloop Trace View
Traceloop 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.

Traceloop Detailed Trace View
Traceloop Detailed Trace View

Troubleshooting

If you don't see your telemetry data:

  1. Verify network connectivity - Ensure your application can reach 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
  4. Try a console exporter β€” Enable a console exporter locally to confirm that your application is generating telemetry data before it’s sent to SigNoz

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: January 14, 2026

Edit on GitHub

Was this page helpful?