Skip to Content

How does Rius read OpenLLMetry tool call attributes?

Rius reads OpenLLMetry tool calls at ingest and moves them onto the OpenTelemetry GenAI keys, so a tool step shows up as a tool span with its name, input and output. The Traceloop decorator kind tool becomes the tool span kind, the decorated function’s name becomes gen_ai.tool.name, and traceloop.entity.input and traceloop.entity.output become input.value and output.value. You point the OpenLLMetry exporter at Rius and change nothing in your instrumentation.

How it works

OpenLLMetry (Traceloop’s SDK) marks tool steps with these attributes, and Rius normalizes them when the span arrives. For background on the full pipeline, see Trace LLM calls with OpenTelemetry.

  • Span kind. traceloop.span.kind takes the values workflow, task, agent and tool. Rius turns them into its span taxonomy, so a tool step is classified as a tool span (execute_tool, kind TOOL), and an agent step as an invoked agent.
  • Tool name. The name of the decorated entity becomes the tool name, stored as gen_ai.tool.name. It is the tool’s own name, never the span name. The source key traceloop.entity.name stays on the span too.
  • Arguments and results. traceloop.entity.input and traceloop.entity.output become input.value and output.value. The same happens to the GenAI keys gen_ai.tool.call.arguments and gen_ai.tool.call.result, so a tool’s input and output render like those of any other span. A native input.value or output.value wins over a mapped one.
  • Tool calls inside a model reply. Older OpenLLMetry releases flatten messages into gen_ai.prompt.* and gen_ai.completion.*. Rius reassembles them into the GenAI message shape, where a tool request is a tool_call part with an id, a name and arguments, and its answer is a tool_call_response part.
  • Older spellings. Older usage and streaming names, such as gen_ai.usage.prompt_tokens, move to their current keys. Current OpenLLMetry releases already emit gen_ai.* attributes, and native gen_ai.* keys always win. Normalization fills gaps and never overwrites.

Two things are not mapped yet. The per-completion gen_ai.completion.N.finish_reason of older releases and the flattened tool definitions under llm.request.functions.* are stored under their own names. Keys with no canonical equivalent, such as llm.usage.total_tokens, also keep their names.

Set it up

  1. Point the OpenLLMetry exporter at Rius. OpenLLMetry exports OTLP over HTTP with protobuf by default, which is what the endpoint expects. The full setup is on the OpenLLMetry page.
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>"}, )
  1. Keep marking your tool steps with the Traceloop decorator kind tool. That kind is what makes the span a tool span in Rius. A step marked only as a task or workflow is classified as that kind, not as a tool.
  2. Run one traced agent turn that calls a tool, then open the trace in the console.
  3. Search and filter on the keys Rius stores, not the OpenLLMetry source keys. Use gen_ai.tool.name for the tool, and input.value and output.value for its arguments and result. A filter on traceloop.entity.input matches nothing, because Rius removes the source key it mapped.
  4. If your agent runs long on an older OpenLLMetry release, which records one attribute per message field, raise the per-span attribute limit so spans keep their tools and messages. The Span attribute reference shows the setting under its attribute count limit section.

For the OTLP endpoint, status codes and the other attribute families, see the Interoperability overview.

What you get

  • A tool span you can filter. In the Spans tab, the Tool kind in the All kinds menu lists your OpenLLMetry tool steps next to tool steps from any other sender.
  • The tool’s name. Each tool span carries gen_ai.tool.name, so you can find every call to one tool across traces.
  • Readable input and output. The tool’s arguments and result appear on the span’s Input / Output tab. Spans without captured content show “Content not captured” there, and their timings are unaffected.
  • Tool calls in the model reply. When an older release flattens messages, the reassembled GenAI messages show the model’s tool request and the tool’s response in order.
  • Alerts that see your tools. The Tool Loop alert counts only spans of kind TOOL. Because a Traceloop tool step is classified as one, it takes part in that alert.
  • Model, token and cost analytics work across OpenLLMetry versions, since usage spellings are normalized at ingest.

When something else fits

  • If you can change the instrumentation, the Rius SDK sets the span kind, tool name and tool input and output for you. The Span attribute reference lists the keys to set when you emit spans yourself.
  • If your tool steps are not marked with the Traceloop tool kind, Rius cannot tell them from other steps. Mark them, or emit gen_ai.operation.name as execute_tool yourself.

Still stuck? Get help

Last updated on