Skip to Content

How do I move my alerts from LangSmith to Rius?

Rius evaluates alerts on the traces you send it, so you move an alert by routing your traces to Rius and recreating the rule there. Rius has four pre-defined alerts, custom rules on cost, tokens, duration, errors and more, and webhook, email and Slack channels. Rules that depend on LangSmith feedback or evaluators have no counterpart, because Rius has neither.

How it works

An alert in Rius is a rule over the spans you send, so the order is: traces first, rules second. The Migrate from LangSmith to Rius guide covers the three ways to send traces, and the Migrate to Rius overview covers the general approach.

The LangSmith ideas map to Rius like this:

  • Project becomes an agent, named by service.name. In a rule, filter by Service or Agent to measure whole runs.
  • Run type becomes span kind. Filter a rule by Span kind, Model, Operation or Step.
  • Thread becomes a session. Filter a rule by Session once your code sets session.id.
  • Notification targets become alert channels: webhook, email or Slack.

Rius has four pre-defined alerts: Consistent Error Pattern, Swallowed Error (formerly Silent Failure), Tool Loop and Context rot. You can turn them off but not delete them. Custom rules can measure cost, input, output and reasoning tokens, duration, time to first token, context usage, error rate, LLM error rate, errors, traces and LLM calls.

A rule measures only the spans it matches. Tokens and cost live on the spans for model calls (LLM, embedding, reranker). A rule filtered to tool, chain or agent spans only therefore measures no tokens and no cost. To alert on model spend, filter Model, or set Span kind to LLM. Cost is a list-price estimate in US dollars, so set thresholds with that in mind.

For a firing alert you can optionally run a root-cause analysis. It runs against a monthly analysis budget, at most once per service every 5 minutes.

Set it up

  1. Send your traces to Rius. For a LangChain or LangGraph app, install the langchain extra and replace the LangSmith environment with one init() call. The LangSmith migration guide covers @traceable code and the no-code export path.

    pip install "glassflow-rius[langchain]" # After: Rius export RIUS_API_KEY="ri_..."
    import rius client = rius.init(service_name="my-agent")
  2. Mark your tools as tools. The Tool Loop alert counts only spans of kind TOOL. A tool traced with a bare observe becomes a CHAIN span and is never counted. Replace @traceable(run_type="tool") with the TOOL kind:

    @rius.observe(kind=rius.SpanKind.TOOL) def get_weather(city: str) -> str: ...

    Tools that an integration already records need no change.

  3. Map threads to sessions. If a LangSmith alert was scoped to a conversation, wrap each turn in with rius.session(thread_id):. If you use LangSmith’s OpenTelemetry export instead of the SDK, the thread arrives as langsmith.metadata.thread_id, not session.id, so a Session filter does not match. Move to the SDK for sessions.

  4. Check the four pre-defined alerts. They cover repeated errors, errors that are swallowed, tool loops and context rot. Compare them with your LangSmith alert list and skip any rule you would only recreate.

  5. Recreate each remaining rule as a custom alert. For each one, pick the metric, set the threshold, filter by service, agent, step, model, span kind, operation or session, and attach a webhook, email or Slack channel. Use the filter guidance above so the rule matches spans that carry the metric.

  6. Run both side by side, then cut over. Keep LangSmith alerts running while the Rius rules fire on real traffic. Then follow the cutover checklist in the LangSmith guide: unset LANGSMITH_TRACING, remove @traceable and the wrappers, and revoke the LangSmith keys once nothing sends to them.

What you get

  • Alerts on the same trace data you inspect, with cost computed by Rius from the model and token counts.
  • Four pre-defined alerts that work as soon as spans arrive.
  • Custom rules filtered down to a service, agent, model, span kind or session.
  • Delivery to webhook, email or Slack.
  • An optional root-cause analysis on a firing alert.
  • A reversible move. You can send traces to both backends while you compare, and cut over only when Rius shows what you need.

When something else fits

Some alerts have no counterpart. Rius has no feedback scores, evaluators, datasets or annotation queues, so any rule that depends on them has nothing to measure. Keep those in LangSmith or a dedicated eval tool and run both backends. Rius also starts from the first span you send, so existing LangSmith traces and their alert history stay in LangSmith.

Still stuck? Get help

Last updated on