How does Rius read OpenLLMetry conversation id attributes?
Rius groups OpenLLMetry traces into a session from session.id, or from gen_ai.conversation.id when session.id is absent. The platform reads both keys as sent, with no renaming. A span with neither is grouped by its trace id, so each trace is its own session.
How it works
Rius has two session keys, and it reads them on each span:
session.idis the first choice. It groups the traces of one session, such as a conversation or an agent run.gen_ai.conversation.idis the OpenTelemetry GenAI conventions’ session key. Rius reads it as the session whensession.idis absent, so spans that follow those conventions group into sessions withoutsession.id.- With neither key, the span falls back to its trace id.
The platform reads the session per span, not per trace. Put the key on every span of the trace, not only the root.
OpenLLMetry traces go through Rius’s OpenLLMetry normalization at ingest. It maps these inputs onto Rius’s canonical keys:
traceloop.span.kindandllm.request.typebecome the span taxonomy.traceloop.entity.*becomes the tool or agent name, andtraceloop.entity.inputandoutputbecomeinput.valueandoutput.value.- The older usage spellings,
gen_ai.usage.prompt_tokensandcompletion_tokens, move to their current keys. - The older flattened
gen_ai.prompt.*andgen_ai.completion.*messages are reassembled into the GenAI message shape.
This mapping does not rename any key into a session or conversation key. OpenLLMetry’s @conversation, set_conversation_id() and withConversation() write gen_ai.conversation.id directly, so they group sessions with no mapping. OpenLLMetry’s association properties, such as traceloop.association.properties.session_id, are not read as the session. Native gen_ai.* keys always win over normalized ones, and normalization only fills gaps. An attribute under any other name is stored as sent, and it does not group traces into a session.
The full mapping is in the span attribute reference, and the sender setup is on the OpenLLMetry page.
Set it up
- Point OpenLLMetry’s exporter at Rius. This is the only setup step, and the OpenLLMetry page covers it in full.
from traceloop.sdk import Traceloop
Traceloop.init(
app_name="my-agent",
api_endpoint="https://ingest.eu.console.rius-glassflow.com",
headers={"Authorization": "Bearer <your API key>"},
)- Make sure each span of a conversation carries the same value under
session.idorgen_ai.conversation.id. OpenLLMetry’s conversation helpers do this for you; How do I group spans into sessions with OpenLLMetry? walks through them. Set the id before the root span starts, because the trace list shows each trace under the session of its root span. - Run one traced call, then open the trace in the console. Check that the span shows a model name and token counts, and that the trace appears under the session you expect.
- When you search or filter in trace inspection, use the stored key. Use
gen_ai.usage.input_tokensrather thangen_ai.usage.prompt_tokens, andsession.idorgen_ai.conversation.idas you sent them.
For the wider picture of sender paths, see Trace LLM calls with OpenTelemetry. The interoperability overview lists the other ways to send traces.
What you get
- Traces from one conversation group into a single session, so you can follow a multi-turn exchange across traces.
- OpenLLMetry’s older and newer attribute spellings land on the same canonical keys. Model, token and cost analytics work across versions.
- Spans with no session key still show up. Each trace stands as its own session instead of being dropped.
- Searches use one stable set of keys. You filter on
gen_ai.conversation.idorsession.idas sent, and on canonical keys for everything Rius normalizes.
When something else fits
- If your app keeps its conversation id under another attribute name, copy that value into
session.idorgen_ai.conversation.idbefore export. OpenLLMetry association properties are not mapped to sessions. - If you use the Rius SDK instead of an OpenLLMetry exporter, its session scopes (
rius.sessionin Python,withSessionin TypeScript) stampsession.idfor you.