---
title: OpenTelemetry integration for AI Center
description: Send GenAI spans to Coralogix AI Center using the standard OpenTelemetry GenAI semantic conventions, vendor-neutral, no Coralogix-specific SDK required.
url: https://coralogix.com/docs/user-guides/ai/otel-integration/
product: ai
feature: AI App Catalog
feature_id: ai-app-catalog
feature_identifier: ai/ai-app-catalog
last_updated: '2026-11-08'
---

# OpenTelemetry integration for AI Center

OpenTelemetry (OTEL) GenAI semantic conventions define a standardized set of span attributes for observing generative AI applications. Instead of each AI provider or instrumentation library inventing its own telemetry format, these conventions establish a common schema for recording LLM requests, responses, token usage, and tool calls.

By adopting OTEL GenAI conventions, you get:

* **Vendor-neutral observability**: the same span attributes work regardless of whether you use OpenAI, Anthropic, Google Vertex AI, or another provider.
* **Automatic correlation**: traces link prompts to completions to downstream tool calls, giving you end-to-end visibility into AI agent workflows.
* **Interoperability**: any OTEL-compatible collector, backend, or visualization tool can process GenAI spans.

Coralogix AI Center natively ingests and renders GenAI spans that follow the [OpenTelemetry GenAI semantic conventions](https://coralogix.com/docs/user-guides/ai/otel-integration/span-attributes.md).

Recommended: install OBI for one-step setup

The simplest way to feed AI Center is to install **[Coralogix eBPF auto-instrumentation (OBI)](https://coralogix.com/docs/opentelemetry/instrumentation-options/ebpf-auto-instrumentation/overview.md)** on the host running your AI application. One install captures AI/LLM traffic from OpenAI, Google Gemini (AI Studio and Vertex AI), AWS Bedrock, Qwen (DashScope), MCP over JSON-RPC, embedding providers, and rerank providers, and brings every other OBI capability (distributed tracing, database observability, encrypted-traffic visibility, cloud metadata decoration) along on the same install. No code changes, no SDKs, no per-language agents.

## Instrument with OpenTelemetry GenAI semconv

Prefer to instrument your application directly with OpenTelemetry instead of using OBI? AI Center supports **any** instrumentation that emits `gen_ai.*` attributes per the spec. Whether you create spans manually, use an OpenTelemetry contrib instrumentation, or use a community library like OpenLLMetry.

Pick the path that fits your stack:

* **A library already covers your provider** → use it. See [Compatibility matrix](https://coralogix.com/docs/user-guides/ai/otel-integration/providers.md) for verified libraries that emit OTEL GenAI semconv.
* **No library covers your provider or language** → instrument manually. See [Span attribute inventory](https://coralogix.com/docs/user-guides/ai/otel-integration/span-attributes.md) for the attributes AI Center expects.

The libraries surfaced in this doc set are third-party open-source projects, not Coralogix products. Coralogix does not own, maintain, or endorse them. AI Center accepts spans from any of them, and from any custom instrumentation that follows the spec.

Ready to get started?

Jump to a working setup with [Code examples](https://coralogix.com/docs/user-guides/ai/otel-integration/code-examples.md). Copy-pasteable Python, Java, .NET, and Go scripts that send GenAI spans to Coralogix.

## Let your coding agents do this

Recommended

Easiest way through this page: hand it to your coding agent. Copy this prompt in:

```
Read https://coralogix.com/docs/ai-center, install the ai-app-instrumentation skill

(npx -y skills add coralogix/cx-skills --skill ai-app-instrumentation -y), then run it to

instrument this application and verify the data in Coralogix AI Center.
```

The [ai-app-instrumentation skill](https://coralogix.com/docs/ai-center) figures out how your app calls the LLM, wires up the right instrumentation, runs a real request through your app, and checks the spans actually land in AI Center, fixing things and re-running until they do. It only asks you for what it can't get on its own, like a Send-Your-Data key.

## What you need

The skill above works these out for you. You only need this list for the manual setup below.

* An OpenTelemetry-instrumented application. See [Compatibility matrix](https://coralogix.com/docs/user-guides/ai/otel-integration/providers.md) for the library that fits your stack.
* An [OpenTelemetry Collector](https://coralogix.com/docs/opentelemetry/configuration-options/install-opentelemetry-on-an-ec2-instance.md) with the [Coralogix Exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/coralogixexporter) configured (recommended), **or** a Coralogix [Send-Your-Data API key](https://coralogix.com/docs/user-guides/account-management/api-keys/api-keys.md) for direct OTLP export.

AI Center processes **only trace data**, not logs, and retrieves it **exclusively from your [S3 archive](https://coralogix.com/docs/user-guides/data-flow/s3-archive/connect-s3-archive.md)**. Data stored in Frequent Search will be ignored. Instrument your observability data as traces and route it to archive storage.

For the complete list of attributes AI Center consumes, see [Span attribute inventory](https://coralogix.com/docs/user-guides/ai/otel-integration/span-attributes.md).

## Manual setup

This is the manual alternative to the skill above, in case you'd rather do it yourself or don't have a coding agent handy.

### Step 1: Deploy an OpenTelemetry Collector (recommended)

Export traces from your application to a local [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/) running the [Coralogix Exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/coralogixexporter). The collector handles authentication, batching, and retry, keeping credentials out of your application code.

Select your Coralogix region using the domain selector at the top of this page. The domain in the collector config below updates to match the region you pick.

Minimal collector config (`otel-collector-config.yaml`). AI Center uses traces; select metrics or logs too if the same collector sends them to Coralogix.

Traces\[ ]Metrics\[ ]Logs

<!--$?-->

<!--/$-->

Preserve application and subsystem names set by your app

When `application_name_attributes` and `subsystem_name_attributes` are configured, the collector resolves the application and subsystem from the resource attributes your app sets (for example, `cx.application.name` and `cx.subsystem.name`). If neither attribute is found, it falls back to the static `application_name` and `subsystem_name` values. Without these settings, the collector uses only the static fallback and ignores the values your application sends.

Alternative: export directly to Coralogix (no collector)

If you prefer to skip the collector, your application can export traces directly to the Coralogix OTLP endpoint. Use the domain selector at the top of this page to set your region, the endpoint below updates automatically.

```
export OTEL_EXPORTER_OTLP_ENDPOINT="https://ingress.eu2.coralogix.com:443"

export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer <your-api-key>"

export OTEL_RESOURCE_ATTRIBUTES="cx.application.name=my-app,cx.subsystem.name=my-subsystem"
```

### Step 2: Set application environment variables

```
export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4317"

export OTEL_EXPORTER_OTLP_INSECURE="true"

export OTEL_SERVICE_NAME="my-ai-service"

export OTEL_RESOURCE_ATTRIBUTES="cx.application.name=my-app,cx.subsystem.name=my-subsystem"

export OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true

export OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental
```

### Step 3: Install auto-instrumentation

The setup varies by language and provider. See [Code examples](https://coralogix.com/docs/user-guides/ai/otel-integration/code-examples.md) for complete, copy-paste-ready scripts for OpenAI Agents, Anthropic Claude, AWS Bedrock, and more.

If your provider or language lacks an open-source instrumentation library, you can manually create GenAI spans. See [Span attribute inventory](https://coralogix.com/docs/user-guides/ai/otel-integration/span-attributes.md) for the full list of `gen_ai.*` attributes AI Center consumes.

See [Compatibility matrix](https://coralogix.com/docs/user-guides/ai/otel-integration/providers.md) for the full list of verified instrumentation libraries.

## Troubleshooting

### Spans not appearing in AI Center

Coralogix AI Center filters for GenAI spans using `gen_ai.provider.name` or `gen_ai.input.messages`. If neither attribute is set, the span will not appear.

### Truncated attribute values can break span parsing

AI Center stores several GenAI attributes as JSON-encoded strings, most importantly `gen_ai.input.messages` and `gen_ai.output.messages`. If your OpenTelemetry SDK is configured to cap attribute-value length, these payloads are cut off mid-JSON which can cause some fields to fail parsing.

The cap comes from either of these standard OpenTelemetry SDK environment variables, both of which default to no limit:

```
OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT       # applies to all attributes

OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT  # applies to span attributes
```

**Fix**: Unset both variables so GenAI attribute values are exported in full. If your environment requires a cap, set it high enough to hold your largest message payload.

### Missing message content

Many libraries **do not capture message content by default**. Enable it:

```
# OTel Python contrib

export OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true



# OpenLLMetry / Traceloop

export TRACELOOP_TRACE_CONTENT=true
```

### Verifying spans with DataPrime

```
source spans

| filter tags['gen_ai.provider.name']:string != null

| select $m.traceID,

         tags['gen_ai.provider.name']:string,

         tags['gen_ai.request.model']:string,

         tags['gen_ai.usage.input_tokens']:string,

         tags['gen_ai.usage.output_tokens']:string

| limit 10
```

### Instrumentation not capturing spans

The `instrument()` call must come **after** importing the LLM provider library. If you call `instrument()` before importing the provider SDK, the instrumentor cannot patch the library and no spans are emitted.

```
# Correct order

import openai                          # 1. Import provider first

from opentelemetry.instrumentation.openai_v2 import OpenAIInstrumentor



OpenAIInstrumentor().instrument()      # 2. Then instrument
```

```
# Wrong order — no spans will be captured

from opentelemetry.instrumentation.openai_v2 import OpenAIInstrumentor



OpenAIInstrumentor().instrument()      # Instrument runs before provider is imported

import openai                          # Too late — library was not patched
```

### Common attribute mistakes

| Mistake                                                | Fix                                                                             |
| ------------------------------------------------------ | ------------------------------------------------------------------------------- |
| `gen_ai.input.messages` set as object, not string      | Must be a **string** containing JSON, not a native object                       |
| Missing `role` field in messages                       | Every message must have a `role` field                                          |
| Using `gen_ai.model` instead of `gen_ai.request.model` | Correct: `gen_ai.request.model` (request) or `gen_ai.response.model` (response) |

## Further reading

* [OpenTelemetry GenAI Semantic Conventions spec](https://opentelemetry.io/docs/specs/semconv/gen-ai/)
* [OTel Python Contrib GenAI instrumentors](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation-genai)
* [OpenLLMetry by Traceloop](https://github.com/traceloop/openllmetry)
* [Microsoft.Extensions.AI documentation](https://learn.microsoft.com/en-us/dotnet/ai/microsoft-extensions-ai)

## Next steps

Start sending spans with [Code examples](https://coralogix.com/docs/user-guides/ai/otel-integration/code-examples.md). Copy-pasteable Python, Java, .NET, and Go scripts for the most common providers.
