How do I move my metadata and tags from LangSmith to Rius?
Rius carries LangSmith metadata and tags over as span attributes: you set each key and value on the span with set_attribute. A thread ID in metadata maps to a Rius session, set once with rius.session() around the call. Rius has no separate tag concept, so each tag becomes an attribute of your own naming. The full walkthrough is in Migrate from LangSmith to Rius.
How it works
The mapping has three parts.
- Metadata becomes span attributes. Every step of a Rius trace is an OpenTelemetry span, and a span holds key and value attributes. A LangSmith
metadataentry becomes one attribute on the span it described. - Tags become attributes too. Rius has no tag concept. Pick an attribute key that reads as a tag for you, such as a release channel or an experiment name, and set it the same way.
- Thread metadata becomes a session. LangSmith asks you to put
thread_idorsession_idin the metadata of every run, child runs included. In Rius a session is a scope, not metadata.with rius.session(thread_id):stampssession.idon every span started inside it, including spans from auto-instrumentation, so you set it once per request.
If you cannot change code yet, LangSmith’s own OpenTelemetry export can send to Rius. Metadata then arrives as span attributes named langsmith.metadata.*. A thread_id or session_id arrives as langsmith.metadata.thread_id, not as session.id, so those traces are not grouped into sessions.
Set it up
- Swap the LangSmith setup for the Rius SDK. Install it with the extras your libraries need, call
rius.init()once at startup, and remove@traceableand the client wrappers. The migration guide has the full before and after for each path. For this question you only need the SDK initialised:
pip install "glassflow-rius[openai,anthropic]"-
Move the thread ID to a session. Replace
metadata={"thread_id": thread_id}with arius.session(thread_id)scope around the call. -
Move each metadata entry and tag to an attribute. Inside a span you open with
rius.start_as_current_span(...), callset_attribute(key, value)on that span. The keys below,customer_tierandrelease_channel, are examples of your own names:
import rius
rius.init(service_name="my-agent")
with rius.session(thread_id):
with rius.start_as_current_span("Chat Pipeline") as span:
span.set_attribute("customer_tier", "pro") # was metadata
span.set_attribute("release_channel", "beta") # was a tag-
Inside a function you decorate with
@rius.observe, use the current span. Callopentelemetry.trace.get_current_span().set_attribute(key, value)from within that function. It sets the attribute on the span the decorator opened. -
Check one traced request end to end. Run both backends side by side for a service or an environment, as the guide describes. Confirm that the attributes appear on the span you expect and that the turns of a conversation group in the sessions view.
To start without code changes, point LangSmith’s OpenTelemetry export at Rius with these variables (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 this as a bridge for the evaluation period. It sends no inputs, outputs or messages, so the trace view shows no content for those spans. Move to the Rius SDK when you need content and sessions. The wider route is covered in Migrate to Rius.
What you get
- Your metadata and tags on the spans they describe, under key names you choose.
- Conversation turns grouped into sessions from a single
rius.session()scope, with no per-runthread_id. - The same nested trace structure you know from LangSmith, with each model call recorded as a generation that carries model, token counts and server-side cost.
- A reversible migration. You can leave LangSmith tracing on while Rius receives the same traces, and cut over when Rius shows what you need.
When something else fits
- If you rely on feedback scores, annotation queues, datasets, experiments or evaluators attached to your runs, Rius has no equivalent. Keep those workflows in LangSmith and run both backends.
- Existing traces and their metadata stay in LangSmith, because Rius has no importer. It starts from the first span you send.