The endpoint accepts both OTLP HTTP JSON and OTLP HTTP protobuf (
application/x-protobuf). If you
use the OpenTelemetry Collector, encoding: json still works but is no longer required — the
default protobuf encoding is accepted too.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
Native SDK
Best for rich Sentrial sessions, prompt variants, costs, and wrappers.
Ingestion Options
Compare the native SDK and OpenTelemetry paths.
Endpoint
sessions:write and events:write scopes.
Collector Configuration
Forward traces from an OpenTelemetry Collector to Sentrial. The canonical collector config lives atservices/otel-collector/config.yaml in the repo — keep this snippet in sync with it:
3001, use:
Recommended Attributes
Sentrial reads standard OpenTelemetry GenAI semantic-convention attributes — no Sentrial-specific attributes are required. Instrument with plain OTel and you are a first-class citizen. The one attribute Sentrial depends on is the conversation id (gen_ai.conversation.id) — a standard GenAI semconv attribute that older or base OTel tooling may not emit by default, so you may need to set it explicitly to group multi-turn sessions.
Conversation grouping is the one attribute Sentrial depends on that you may need to set explicitly. Set the standard
gen_ai.conversation.id on your spans to group multi-turn runs into one conversation; conversation.id (unprefixed) is accepted as an alias.Legacy attributes (deprecated)
Legacy attributes (deprecated)
Earlier integrations used
sentrial.* attributes (sentrial.agent.name, sentrial.user_id, sentrial.convo_id, sentrial.input, sentrial.output, sentrial.cost, sentrial.tool.name) and ad-hoc conversation keys (convo.id, thread.id, chat.id, session.conversation_id). These are still read as lower-priority fallbacks for backward compatibility, but are deprecated — prefer the standard attributes above. (sentrial.experiment.assignment_id remains specific to production prompt A/B testing.)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.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.

