Skip to content

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.

Recommended: install OBI for one-step setup

The simplest way to feed AI Center is to install Coralogix eBPF auto-instrumentation (OBI) 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:

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 — copy-pasteable Python, Java, .NET, and Go scripts that send GenAI spans to Coralogix.

What you need

AI Center processes only trace data, not logs, and retrieves it exclusively from your S3 archive. 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.

Set up auto-instrumentation

Export traces from your application to a local OpenTelemetry Collector running the Coralogix Exporter. 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):

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: "0.0.0.0:4317"

exporters:
  coralogix:
    domain: ""
    private_key: "${CORALOGIX_PRIVATE_KEY}"
    application_name: "my-genai-app"
    subsystem_name: "my-service"
    application_name_attributes:
      - "cx.application.name"
    subsystem_name_attributes:
      - "cx.subsystem.name"
    timeout: 30s

service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [coralogix]

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.: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 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 for the full list of gen_ai.* attributes AI Center consumes.

See Provider compatibility for the full 16-provider × 5-language table and Framework compatibility for agent frameworks and orchestration tools.

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.

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

Common attribute mistakes

MistakeFix
gen_ai.input.messages set as object, not stringMust be a string containing JSON, not a native object
Missing role field in messagesEvery message must have a role field
Using gen_ai.model instead of gen_ai.request.modelCorrect: gen_ai.request.model (request) or gen_ai.response.model (response)

Further reading

Next steps

Start sending spans with Code examples — copy-pasteable Python, Java, .NET, and Go scripts for the most common providers.