How do I move my cost tracking from Traceloop to Rius?
Rius computes cost for you, so moving cost tracking from Traceloop is a settings change: keep OpenLLMetry and point its exporter at Rius. Your LLM calls arrive as generations with model, token counts and cost computed on the Rius side, and you send no cost value. Costs are list-price estimates in US dollars, not billed amounts. Traceloop’s own platform features have no Rius counterpart. The Traceloop migration guide covers the full walkthrough.
How it works
Traceloop’s SDK is OpenLLMetry, which is plain OpenTelemetry. It exports OTLP to whatever endpoint you give it, and Rius reads those spans without code changes.
- LLM spans become generations. A span such as
openai.chatoranthropic.chatshows in Rius with the request and response model, input and output tokens and cache-read tokens. - Rius prices each generation. It takes the model and token counts and prices them with LiteLLM’s public model-price catalog, in US dollars. Cache reads and writes are priced at their own rates.
- Unknown models get an empty cost. A model the catalog does not know shows no cost, not zero.
- You never send cost. Do not add a cost attribute to your spans. Rius computes it from the spans.
- Metrics are not part of it. Rius ingests traces, not OTLP metrics, so token, cost and latency analytics are computed from the spans instead.
- Decorators keep their structure.
@agentand@toolspans appear as agent and tool spans, and@workflowand@taskspans appear as generic steps. Cost sits on the model calls inside them.
What has no counterpart: Rius has no custom model prices and no negotiated, batch, flex, priority or long-context discounts. If your current numbers include any of those, expect Rius figures to differ.
Set it up
-
Create a Rius workspace and API key. Give each environment, such as production and staging, its own workspace and key.
-
Decide how you compare. To see Traceloop’s and Rius’s numbers on the same traffic, do not re-point OpenLLMetry directly yet: send it to an OpenTelemetry Collector that exports to both, as the side-by-side setup shows, so both see identical spans. Once you are ready to switch, re-point OpenLLMetry itself. Remove
TRACELOOP_API_KEYfrom your deployment, because the Rius header replaces it, and set the base URL and header:# Before: Traceloop export TRACELOOP_API_KEY="<your Traceloop API key>" # After: Rius export TRACELOOP_BASE_URL="https://ingest.eu.console.rius-glassflow.com" export TRACELOOP_HEADERS="Authorization=Bearer%20<your Rius API key>" export TRACELOOP_METRICS_ENABLED="false" # Python SDK only -
In Python, keep
TRACELOOP_METRICS_ENABLEDset to false. The Python SDK also exports metrics to the same base URL, and Rius answers those requests with a 404 that is logged on every export. Traces and cost are unaffected either way. -
In Python, remove old
TRACELOOP_BASE_URLandTRACELOOP_HEADERSvalues from other places. They override the arguments you pass toTraceloop.init(). Use anhttporhttpsbase URL, because Rius accepts OTLP over HTTP only. -
Check one traced request. The trace tree should show your workflow, agent and tool spans, the generation should show model and token counts, and a cost should appear on it. If you fanned out, compare token totals and cost for a few days before you remove the Traceloop exporter and revoke its key.
If you would rather swap to the Rius SDK, remove OpenLLMetry first. Both instrument the same client libraries, so running both produces duplicate LLM spans and counts calls twice. The decorators map to observe with a span kind, and the migration guide has the full table.
What you get
- Cost per model call, computed by Rius from the model and token counts, with no cost value in your code.
- Cost by model, tokens, error rate and time to first token over ranges from 15 minutes to 30 days or a custom range.
- Custom alerts on cost. To alert on model spend, filter by Model, or set Span kind to LLM, because tokens and cost live on model-call spans. Filtering only tool, chain or agent spans measures no cost.
- Traces grouped by session. OpenLLMetry writes
gen_ai.conversation.idfor@conversation,set_conversation_idandwithConversation, and Rius reads it as the session. Set it before the root span starts. - Users, if you set
user.id. Association properties such asuser_idarrive as attributes undertraceloop.association.properties.*, but Rius does not read them as users, so setuser.idyourself on the root span.
See Migrate to Rius for the other tools Rius has migration guides for.
When something else fits
- If your code uses Traceloop’s prompt registry, guardrails, user feedback, datasets or experiments, keep OpenLLMetry pointed at Traceloop and add Rius through the Collector fan-out. In Python, re-pointing the base URL switches those features off.
- If you need negotiated or discounted model prices in your cost numbers, Rius does not apply them, so keep that reporting where you have it.
- Existing traces stay in Traceloop. Rius starts from the first span you send, so keep Traceloop for historical cost.