How do I move my historical traces from LangSmith to Rius?
Rius does not import historical LangSmith traces, so you move forward by sending new traces to Rius while your past runs stay in LangSmith. Rius starts from the first span you send it. For most apps the change is one dependency and a few lines of setup. The Migrate from LangSmith to Rius guide covers each path in full.
How it works
There is no importer for LangSmith runs, so migration means pointing new traffic at Rius. Rius takes OpenTelemetry traces, and its SDK hooks the same LangChain callbacks LangSmith uses. Here is how the concepts map:
- Project becomes an agent, named by
service.name(service_nameinrius.init()). Give each environment its own workspace and API key. - Trace stays a trace, a tree of nested steps. Each run becomes a span.
- Run type (
llm,chain,tool,retriever,embedding) becomes the span kind. Integrations set it for you, andkind=on@rius.observesets it by hand. - LLM run becomes a generation: a span with model, tokens and cost. Rius computes cost on the server from the model and token counts.
- Thread (
thread_idorsession_idmetadata) becomes a session.with rius.session(thread_id):stampssession.idon every span in scope, child spans included. - Metadata and tags become span attributes. Rius has no separate tag concept.
These have no counterpart in Rius: feedback and annotation queues, datasets, experiments and evaluators (including LLM as judge), Prompt Hub and Playground, LangSmith Deployment and Studio, and self-hosting, because Rius is a managed service only. Historical data has no counterpart either.
Set it up
-
Create a Rius workspace and API key. Your history stays in LangSmith, and Rius fills from the first span you send.
-
If your app runs on LangChain or LangGraph, install the
langchainextra and replace the LangSmith environment with oneinit()call. Your chains, agents and graphs stay as they are.
pip install "glassflow-rius[langchain]"
# Before: LangSmith
export LANGSMITH_TRACING=true
export LANGSMITH_API_KEY="lsv2_..."
export LANGSMITH_PROJECT="my-agent"
# After: Rius
export RIUS_API_KEY="ri_..."import rius
client = rius.init(service_name="my-agent")In a short-lived script, call client.flush() before it exits.
-
If you use
@traceableand the client wrappers, swap them one to one:@traceablebecomes@rius.observe, andname=carries over.@traceable(run_type="tool")becomes@rius.observe(kind=rius.SpanKind.TOOL). A tool function you trace yourself needs the TOOL kind, because a bareobservemakes a CHAIN span.@traceable(run_type="retriever")becomes@rius.observe(kind=rius.SpanKind.RETRIEVER).wrap_openai(OpenAI())andwrap_anthropic(Anthropic())become plainOpenAI()andAnthropic().rius.init()traces the libraries process-wide, so there is no wrapper to forget.thread_idin metadata becomeswith rius.session(thread_id):around the request, set once instead of on every run.- Other metadata and tags become
span.set_attribute(key, value).
-
If you cannot change code yet, LangSmith’s own OpenTelemetry export can send new runs to Rius. This needs
langsmith0.4.25 or newer:pip install "langsmith[otel]" export LANGSMITH_TRACING=true export LANGSMITH_OTEL_ENABLED=true export LANGSMITH_OTEL_ONLY=true # send only to the OTLP endpoint below 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"Treat it as a bridge: it brings the trace tree, generations with tokens and cost, and tool spans. Inputs, outputs and messages do not arrive, and thread IDs arrive as
langsmith.metadata.thread_idrather thansession.id, so traces do not group into sessions. -
Run both backends side by side. With the Rius SDK, leaving
LANGSMITH_TRACING=trueset keeps LangSmith receiving traces from the same process. Compare trace counts, token totals and cost for a few days, then unsetLANGSMITH_TRACING, remove@traceableand the wrappers, and revoke the LangSmith keys. The Migrate to Rius page covers the other tools and the OpenTelemetry route.
What you get
- New traces in Rius with the same nested structure you see in LangSmith: the agent run, each model step and each tool step.
- Each model call as a generation with model, token counts and a list-price cost estimate in US dollars.
- Sessions from your thread IDs, plus users, alerts and an MCP server your coding agent can use to query production traces.
- A reversible migration. LangSmith keeps your past runs and keeps receiving traces until you remove it.
When something else fits
- If you need to look up past runs, keep LangSmith for that history. Rius cannot hold it.
- If evaluations, datasets, feedback queues or prompt management are central to your workflow, keep those in LangSmith or a dedicated tool and use Rius for tracing, cost and alerts.
- If you need to host the platform yourself, Rius does not fit, because it is a managed service only.