How do I move my metadata and tags from Traceloop to Rius?
Rius keeps your Traceloop association properties as span attributes, and you set user.id and a session id to get Rius users and sessions. Conversation ids map to sessions with no change. Properties such as user_id and chat_id arrive as attributes you can inspect and filter on. Rius does not group traces by them until you set user.id yourself. The full migration is covered in Migrate from Traceloop to Rius.
How it works
Traceloop’s metadata is OpenLLMetry’s association properties, and OpenLLMetry is plain OpenTelemetry. Each concept lands in Rius like this:
- Association properties (
user_id,chat_idand any other key) arrive as span attributes stored undertraceloop.association.properties.*. You can see and filter on them in trace inspection. Rius does not read them as its users or sessions. - Conversations (
@conversation,set_conversation_id(),withConversation()) become Rius sessions. OpenLLMetry writesgen_ai.conversation.idon every span in scope, and Rius reads it as the session. - Users need
user.id. OpenLLMetry does not set it, so the association propertyuser_iddoes not make a Rius user on its own.
Rius lists each trace under the session and the user of its root span, the top-level span of the trace. Set the conversation id before that span starts, and set user.id inside your outermost decorated function, ideally on the other spans too.
This is part of the wider move described in Migrate to Rius. You can keep OpenLLMetry and only re-point its exporter (Path A), or switch to the Rius SDK (Path B).
Set it up
-
Pick your path. To keep OpenLLMetry, re-point its exporter at Rius as the Traceloop migration guide describes. Your decorators and conversation ids carry over unchanged, and so do your association properties, as attributes. To switch to the Rius SDK, remove OpenLLMetry in the same process, because running both duplicates LLM spans.
-
Path A: set
user.idyourself. Keep your association properties as they are. Adduser.idwith the OpenTelemetry API inside the@workflowor@agentthat starts the trace:from opentelemetry import trace trace.get_current_span().set_attribute("user.id", user_id) -
Path A: keep conversation ids. Nothing changes. Set the conversation id before the root span starts so the trace is listed under that session. In TypeScript,
withConversation()also adds a root workflow span. -
Path B: replace the calls. In Python,
set_conversation_id(cid)and@conversationbecomerius.session, andTraceloop.set_association_properties({"user_id": uid})becomesrius.user, which stampsuser.idon every span in scope:import rius rius.init(service_name="trip-planner") # reads RIUS_API_KEY with rius.session(conversation_id): with rius.user(user_id): ... # your traced workIn TypeScript,
withConversationbecomeswithSession. Prefer an opaque user id to an email. -
Update saved searches. If you filter on
traceloop.association.properties.*attributes, those keys only exist while OpenLLMetry keeps sending them. With the Rius SDK, filter on the session and the user instead. Span names also change with the SDK, so update any search that matches on them.
What you get
- Conversations grouped as sessions in Rius, with no code change on Path A.
- Each end user listed with their traces, failures, cost and time to first token, once
user.idis set. - Your other association properties kept as attributes you can inspect and filter on, on Path A.
- Cost computed by Rius from the model and token counts, so you never send a cost value.
What has no counterpart: Rius does not group by association properties as entities, so chat_id and similar keys stay attributes. Traceloop’s platform features that act on metadata, such as monitors, evaluators, datasets and annotation tasks, are not offered in Rius. Existing traces stay in Traceloop, and Rius starts from the first span you send.
When something else fits
- If your code reads properties through Traceloop’s platform features (guardrails,
get_prompt(), user feedback, datasets or experiments), keep OpenLLMetry pointed at Traceloop and add Rius through a Collector fan-out. - If you rely on evaluators or annotation tasks that use your metadata, keep those workflows in Traceloop and send traces to both backends while you compare.