> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getbluejay.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Traces

> See why your agent failed in production.

Bluejay accepts OpenTelemetry traces and shows each trace next to the production conversation that you link it to.

If you are linking traces to simulation results, see [Traces](/test/traces.md).

![The Traces list with one row for each trace, showing its name and ID, a link to the call it belongs to, status or error count, duration, spans, tokens, estimated cost, model, and service](https://mintcdn.com/bluejay/eKcFBkjZX47pI8Ss/images/traces-list.png?fit=max\&auto=format\&n=eKcFBkjZX47pI8Ss\&q=85\&s=904ad4e914dccb6602cf3b523a5439a4)

## Export traces to Bluejay

Bluejay accepts traces from any OpenTelemetry-compatible library, for example OpenInference, OpenLLMetry, or Langfuse. Using a voice framework? Its [integration page](/integrations/phone-number.md) can show a framework-specific setup.

**1. Get an API key**

Create one as described in [Get an API key](/api-reference/introduction.md#make-your-first-request).

**2. Install the packages**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
pip install opentelemetry-sdk opentelemetry-exporter-otlp-proto-http opentelemetry-instrumentation-openai
```

**3. Point the exporter at Bluejay**

Send spans over OTLP HTTP to `https://otlp.getbluejay.ai/v1/traces`, with your API key in the `X-API-KEY` header:

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from opentelemetry.sdk import trace as trace_sdk
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.trace.export import SimpleSpanProcessor
from opentelemetry.sdk.resources import SERVICE_NAME, Resource

tracer_provider = trace_sdk.TracerProvider(
    resource=Resource.create({SERVICE_NAME: "<your_service_name>"})
)
tracer_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter(
    "https://otlp.getbluejay.ai/v1/traces",
    headers={"X-API-KEY": "<BLUEJAY_API_KEY>"},
)))
```

**4. Instrument your LLM client**

For example, the OpenAI client:

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from opentelemetry.instrumentation.openai import OpenAIInstrumentor
OpenAIInstrumentor().instrument(tracer_provider=tracer_provider)
```

## Link a trace

To show a trace next to its conversation, add the conversation's `trace_id` to your [`POST /v1/evaluate`](/api-reference/endpoint/evaluate) request.

## Related

* [Traces API](/api-reference/endpoint/list-traces.md)
* [Traces MCP tools](/mcp/monitoring-tools.md#monitor)
* [Logs](/monitor/logs.md)
* [Tool Calls, Events, and Metadata](/monitor/metrics.md#tool-calls-events-and-metadata)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.