Session ingestion is via OTLP
Session telemetry is ingested over OpenTelemetry (OTLP):begin() / finish() (or the higher-level
wrappers) and the client emits the corresponding OTLP spans. The API key must carry both
sessions:write and events:write scopes; dashboard-generated keys include both automatically.
Legacy REST endpoints (compatibility adapters)
The legacyPOST /api/sdk/sessions and PATCH /api/sdk/sessions/:id endpoints are still
supported for externally-deployed older SDKs (pre-0.7.0 Python / pre-0.5.0 TypeScript). They are
now thin adapters: each translates its REST payload into OTLP spans internally and runs the
exact same ingest pipeline as POST /api/otel/v1/traces. POST /api/sdk/sessions returns the
server-assigned session id (used by subsequent event/complete calls) and requires the
sessions:write scope; PATCH /api/sdk/sessions/:id requires sessions:write too.
Because completion now flows through the OTLP finalize path, session scoring / LLM-judge / signal
detection run asynchronously (durably enqueued) rather than inline in the PATCH response, and the
old “sum cost/tokens from stored event rows when omitted” fallback is gone — the SDK clients
already accumulate and send those values. Prefer upgrading to a current SDK, which emits OTLP
directly.
TypeScript SDK
Track sessions with
@sentrial/sdk.Python SDK
Track sessions with the
sentrial package.Next Steps
Authentication
API keys and scopes.
Python SDK
Use the SDK for easier integration.

