Skip to main content
Sentrial can ingest OpenTelemetry traces over OTLP HTTP JSON. Each trace becomes a Sentrial session, and each span becomes an event in the session timeline.
The current endpoint accepts OTLP HTTP JSON. OTLP protobuf is not enabled yet. If you use the OpenTelemetry Collector, set encoding: json.

When to Use OTel

Use this integration when:
  • your agent framework already emits OpenTelemetry spans
  • you have an existing OpenTelemetry Collector
  • you want vendor-neutral tracing alongside Sentrial classification
  • you are migrating gradually from another tracing tool
For new Sentrial-first integrations, use the native SDK instead.

Native SDK

Best for rich Sentrial sessions, prompt variants, costs, and wrappers.

Ingestion Options

Compare the native SDK and OpenTelemetry paths.

Endpoint

Authenticate with either header:
Your API key needs both sessions:write and events:write scopes.

Collector Configuration

Forward traces from an OpenTelemetry Collector to Sentrial:
For local development with the API server on port 3001, use:
Add these attributes to the root span when possible: Sentrial also maps common GenAI semantic convention attributes, including:
  • gen_ai.system
  • gen_ai.request.model
  • gen_ai.usage.input_tokens
  • gen_ai.usage.output_tokens
  • gen_ai.usage.total_tokens
  • gen_ai.prompt
  • gen_ai.completion

Minimal OTLP JSON Example

Prompt Variants with OTel

OpenTelemetry ingestion does not choose prompt variants by itself. Route the variant first, then attach the assignment ID to your trace.
Add assignment.assignmentId to your root span as sentrial.experiment.assignment_id. Sentrial will link the ingested trace to that variant and classify the run after ingest.

Classification

After Sentrial ingests a trace, it marks the session complete, stores span events, and runs the same signal classification pipeline used for SDK-created sessions.

Next Steps

Sessions

Learn how sessions and events appear in Sentrial.

Custom Integration

Track custom agents with the native SDK.