Can I run Rius alongside LangSmith while I migrate?
Yes, Rius runs next to LangSmith, so you can send the same traces to both during the switch and cut over when Rius shows what you need. You do it with the Rius SDK in the same process, with LangSmith’s OpenTelemetry export in hybrid mode, or with an OpenTelemetry Collector that fans out to both. Keep LangSmith until you have compared real traffic and moved what reads from it. See Migrate to Rius for the other tools.
How it works
There are three ways to send the same runs to both backends. They differ in what reaches Rius.
- The Rius SDK next to LangSmith. For a LangChain or LangGraph app, the Rius SDK hooks the same LangChain callbacks that LangSmith uses. If you leave
LANGSMITH_TRACING=trueset, LangSmith’s callback tracer keeps running next to Rius in the same process. Rius receives the full trace, including content, and sessions once you wrap each turn inrius.session(thread_id). - LangSmith’s OpenTelemetry export in hybrid mode. Set
LANGSMITH_OTEL_ENABLED=trueand do not setLANGSMITH_OTEL_ONLY. LangSmith then sends runs to LangSmith and spans to the OTLP endpoint at once. This needs no code change andlangsmith0.4.25 or newer. - A Collector. Your app exports once to an OpenTelemetry Collector, and the Collector forwards to LangSmith and to Rius. Use this when you want more than one OTLP destination or a single egress point. The Collector page covers the Rius exporter.
The export route has gaps. Spans arrive with the trace tree, model, token counts and cost, and tool runs arrive as tool spans. Chain runs arrive without a span kind. Inputs, outputs and messages do not show in the trace view. A thread_id arrives as langsmith.metadata.thread_id, not session.id, so traces do not group into sessions. Seeing which agent processes are alive, and runs still in progress, needs the Rius SDK. Use the export or the Collector as a bridge for the evaluation, then move to the SDK for content and sessions.
Set it up
Pick one route. The first is the most complete.
- Add the Rius SDK to a LangChain or LangGraph app. Install the
langchainextra and callinit()once at startup. Your chains, agents and graphs stay as they are. The LangSmith migration guide maps@traceableand the client wrappers to their Rius equivalents if you need them.
pip install "glassflow-rius[langchain]"import rius
client = rius.init(service_name="my-agent")-
Keep LangSmith running. Set
RIUS_API_KEYto your key, which starts withri_, and leaveLANGSMITH_TRACING=trueset. In a short-lived script, callclient.flush()before it exits. -
Or change no code and use hybrid export. Set these variables. Leave out
LANGSMITH_OTEL_ONLY, which would send only to the OTLP endpoint and stop LangSmith’s own copy.
pip install "langsmith[otel]"
export LANGSMITH_TRACING=true
export LANGSMITH_OTEL_ENABLED=true
export OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.eu.console.rius-glassflow.com"
export OTEL_EXPORTER_OTLP_HEADERS="authorization=Bearer <your API key>"
export OTEL_SERVICE_NAME="my-agent" # LangSmith defaults it to "langsmith"- Or fan out from a Collector. Add both exporters to the traces pipeline. Use
otlphttp, nototlp, because the plainotlpexporter speaks gRPC and the Rius endpoint does not accept it.
exporters:
otlphttp/langsmith:
traces_endpoint: https://api.smith.langchain.com/otel/v1/traces
headers:
x-api-key: ${env:LANGSMITH_API_KEY}
Langsmith-Project: my_project
otlphttp/rius:
endpoint: https://ingest.eu.console.rius-glassflow.com
encoding: proto
compression: gzip
headers:
authorization: Bearer ${env:RIUS_API_KEY}
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [otlphttp/langsmith, otlphttp/rius]- Check the Collector does not strip attributes. The Collector forwards spans unchanged. If cost or model fields come up empty in Rius, make sure no
attributesortransformprocessor removes thegen_ai.*keys.
What you get
- A like-for-like comparison. The same requests land in both tools, so you can compare trace counts, token totals and cost on real traffic for a few days before you decide.
- A reversible migration. Nothing is removed until you unset LangSmith and revoke its keys.
- Rius cost estimates. Rius computes cost on its side from the model and token counts. These are list-price estimates in US dollars, so expect small differences from any other tool’s figures.
- A bounded trial. A new organization starts on a trial that lasts 30 days or 500,000 spans, whichever comes first, with no card. Sending every trace to both backends uses that allowance, so plan the comparison period around it.
Turn LangSmith off once these hold:
- One traced request matches end to end. The tree looks like the one in LangSmith, each model call shows model and token counts, and cost appears.
- Each conversation turn is wrapped in
rius.session(thread_id)and the turns group in the sessions view. - A few days of real traffic agree on trace counts, token totals and cost.
- Anything that reads from LangSmith, such as dashboards, alerts and internal tools, has moved to Rius or been left behind on purpose.
Then unset LANGSMITH_TRACING, remove @traceable and the wrappers, and revoke the LangSmith keys once nothing sends to them. Rius cannot import existing LangSmith traces, so keep LangSmith available for history.
When something else fits
- If you depend on evaluation, datasets, feedback and annotation queues, or Prompt Hub and the Playground, keep LangSmith for those. Rius has no equivalent, so run both rather than cutting over completely.
- If you need to keep session grouping and trace content during the overlap, use the Rius SDK rather than the OpenTelemetry export, which drops both.
- If you need to send to more than one OTLP destination without touching application code, use the Collector.