Can I keep my OpenTelemetry instrumentation when I leave LangSmith?
Yes, Rius takes the OpenTelemetry instrumentation you already have, so you keep it and point its OTLP exporter, or your Collector, at Rius. Instrumentation that follows OpenLLMetry, OpenInference or the OTel GenAI conventions shows models, tokens and cost in Rius without code changes. Only LangSmith’s own SDK calls, such as @traceable and the client wrappers, need replacing. See Migrate to Rius for the wider picture.
How it works
What stays. Any instrumentation that already emits OpenTelemetry spans stays as it is:
- OpenLLMetry, OpenInference and the OTel GenAI conventions. Rius understands these, so you re-point the exporter and change no code.
- OpenInference’s LangChain instrumentation (
openinference-instrumentation-langchain), if you run your own OpenTelemetry setup for a LangChain or LangGraph app. - LangSmith’s own OpenTelemetry export, available in
langsmith0.4.25 or newer. It sends your runs as spans to any OTLP endpoint, including Rius, with no code change and no LangSmith API key.
What goes. @traceable, wrap_openai and wrap_anthropic are LangSmith’s own API, not OpenTelemetry. Swap them for the Rius SDK, which the LangSmith migration guide maps one to one.
What Rius reads from the spans. Rius normalizes OpenInference, OpenLLMetry and Traceloop, Laminar, Vercel AI SDK 5 and 6, and Pydantic AI attributes when it ingests them. From the model name and token counts it computes cost itself, so you never send a cost value.
From LangSmith’s OpenTelemetry export, Rius reads:
- The trace tree, with LangSmith’s run names.
- Model calls as generations with model, token counts and cost.
- Tool runs as tool spans.
Two details to expect: chain runs arrive without a span kind, and langchain appears as a provider with zero tokens in provider breakdowns.
Three things do not arrive through that export:
- Content. The trace view shows no inputs, outputs or messages for these spans.
- Sessions. A
thread_idorsession_idin run metadata arrives aslangsmith.metadata.thread_id, not assession.id, so traces do not group into sessions. - Live views. Seeing which agent processes are alive, and runs still in progress, needs the Rius SDK.
Set it up
- Create a Rius workspace and an API key. Keys start with
ri_. - Point your OTLP exporter at Rius. The standard environment variables work for any OpenTelemetry setup:
export OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.eu.console.rius-glassflow.com"
export OTEL_EXPORTER_OTLP_HEADERS="authorization=Bearer <your API key>"- Set
OTEL_SERVICE_NAMEto your agent’s name. LangSmith’s export defaults it tolangsmith, and Rius groups traces by agent usingservice.name. - If you are keeping LangSmith’s own export, install
langsmith[otel]and setLANGSMITH_TRACING=true,LANGSMITH_OTEL_ENABLED=trueandLANGSMITH_OTEL_ONLY=true. The last one sends spans only to the OTLP endpoint above. - If you use OpenInference for LangChain, wire your OTLP exporter to Rius and call
LangChainInstrumentor().instrument(tracer_provider=provider). Raise the span attribute limit, for example withOTEL_SPAN_ATTRIBUTE_COUNT_LIMIT=4096. - To compare before you cut over, run both backends. Hybrid mode,
LANGSMITH_OTEL_ENABLED=truewithoutLANGSMITH_OTEL_ONLY, sends to LangSmith and to your OTLP endpoint at once. For more than one destination, use an OpenTelemetry Collector with anotlphttpexporter, nototlp. The interoperability section covers each sender path. - Send one request and check that the trace tree matches LangSmith, that each model call shows model and tokens, and that cost appears.
Treat LangSmith’s OpenTelemetry export as a bridge for the evaluation period. When you need content and sessions, move to the Rius SDK, as the LangSmith migration guide describes.
What you get
- Your existing OpenTelemetry instrumentation keeps running, and only the destination changes.
- Trace trees with nested spans, models and token counts.
- Cost computed on Rius’s side as a list-price estimate in US dollars, with nothing to add to your spans.
- A side-by-side period, because the same spans can go to LangSmith and Rius until you are ready to cut over.
- A clear upgrade path. Moving to the Rius SDK adds content, sessions through
session.id, and live views of running agents.
When something else fits
- If you rely on LangSmith’s datasets, experiments, evaluators, feedback, annotation queues or Prompt Hub, keep those in LangSmith. Rius has no equivalent.
- Existing LangSmith traces cannot be imported. Rius starts from the first span you send it.
- If you need prompts, outputs and thread grouping now, use the Rius SDK rather than LangSmith’s OpenTelemetry export.