Skip to Content

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_name in rius.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, and kind= on @rius.observe sets 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_id or session_id metadata) becomes a session. with rius.session(thread_id): stamps session.id on 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

  1. Create a Rius workspace and API key. Your history stays in LangSmith, and Rius fills from the first span you send.

  2. If your app runs on LangChain or LangGraph, install the langchain extra and replace the LangSmith environment with one init() 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.

  1. If you use @traceable and the client wrappers, swap them one to one:

    • @traceable becomes @rius.observe, and name= 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 bare observe makes a CHAIN span.
    • @traceable(run_type="retriever") becomes @rius.observe(kind=rius.SpanKind.RETRIEVER).
    • wrap_openai(OpenAI()) and wrap_anthropic(Anthropic()) become plain OpenAI() and Anthropic(). rius.init() traces the libraries process-wide, so there is no wrapper to forget.
    • thread_id in metadata becomes with rius.session(thread_id): around the request, set once instead of on every run.
    • Other metadata and tags become span.set_attribute(key, value).
  2. If you cannot change code yet, LangSmith’s own OpenTelemetry export can send new runs to Rius. This needs langsmith 0.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_id rather than session.id, so traces do not group into sessions.

  3. Run both backends side by side. With the Rius SDK, leaving LANGSMITH_TRACING=true set keeps LangSmith receiving traces from the same process. Compare trace counts, token totals and cost for a few days, then unset LANGSMITH_TRACING, remove @traceable and 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.

Still stuck? Get help

Last updated on