Skip to Content
RiusInteroperabilityVanilla OTel SDKs

Vanilla OpenTelemetry SDKs

Any language with an OpenTelemetry SDK can send traces to Rius today: the ingest endpoint is standard OTLP/HTTP. This is the path for languages without a native SDK (everything except Python right now).

Configuration by environment variables

Every OTel SDK honors the standard exporter variables, so this works unchanged in Go, JS/TS, Java, Rust, .NET, and Python:

export OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.eu.console.rius-glassflow.com" export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf" export OTEL_EXPORTER_OTLP_HEADERS="authorization=Bearer <your API key>" export OTEL_SERVICE_NAME="my-agent"

http/protobuf is the default protocol in most SDKs, but set it explicitly: the endpoint accepts no OTLP/JSON and no gRPC (see the contract).

Emitting a well-formed LLM span

The attributes decide what analytics you get. A minimal JS/TS example with everything the platform reads:

import { trace } from '@opentelemetry/api' const tracer = trace.getTracer('my-agent') const span = tracer.startSpan('chat gpt-4o') span.setAttributes({ 'openinference.span.kind': 'LLM', 'gen_ai.operation.name': 'chat', 'gen_ai.request.model': 'gpt-4o', 'gen_ai.provider.name': 'openai', }) const response = await callTheModel() span.setAttributes({ 'gen_ai.usage.input_tokens': response.usage.prompt_tokens, 'gen_ai.usage.output_tokens': response.usage.completion_tokens, 'gen_ai.response.model': response.model, 'gen_ai.output.messages': JSON.stringify([ { role: 'assistant', parts: [{ type: 'text', content: response.text }] }, ]), }) span.end()

Model, tokens, and messages make the span a full generation: it gets cost computed server-side and appears in model analytics. The complete attribute tables, including the message shape and the streaming first-token event, are in the span attribute reference.

Nest spans the normal OpenTelemetry way (parent context) and they arrive as one trace. Wrap each agent run in a single root span; that root’s name, duration, and status are what run-level views show.

What you give up versus a native SDK

Raw OTel emission is fully supported, permanently. The Python SDK adds conveniences on top of it, not a different protocol: message normalization, idempotent first-token capture, export-time privacy controls, and the auto-instrumentation extras. When a JS/TS SDK ships, code written against raw OTel keeps working unchanged.

Next steps

Last updated on