Back to GuidesTelemetry

OpenTelemetry GenAI LLM Cost Tracking

9 min readUpdated June 2026

Why telemetry comes first for some apps

Not every app can move through a gateway immediately. OpenTelemetry-based ingest lets teams start measuring usage and attribution before changing request paths.

Send GenAI traces to Cloptima

Point your OTLP/HTTP trace exporter at Cloptima's GenAI receiver and authenticate with a virtual key. Emit OpenTelemetry GenAI semantic-convention attributes (gen_ai.system, gen_ai.request.model, token usage) and add Cloptima attribution as resource/span attributes.

bash
# OTLP/HTTP exporter -> Cloptima GenAI receiver
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="https://api.cloptima.ai/v1/ai/integrations/otlp/traces"
export OTEL_EXPORTER_OTLP_HEADERS="authorization=Bearer clop_vk_dPXO67p…"

# emit gen_ai.* attributes plus attribution, e.g.
#   gen_ai.system="openai", gen_ai.request.model="gpt-4o-mini"
#   cloptima.team="search", cloptima.app="ranking", cloptima.environment="production"
Prefer minimal wiring? The Cloptima SDKs can deliver the same data in OTLP mode, or via the direct events endpoint.

Use alongside gateway adoption

Telemetry and gateway usage coexist. Cloptima is built for mixed adoption while teams decide which workloads need real-time enforcement.

Validate quality

Review attribution quality regularly. Missing team, app, or environment metadata should become an onboarding task for the owning team.

Put This Guide Into Practice

Cloptima automates the strategies described in this guide.

No credit card required
5-minute setup
Free trial