Skip to content

Repository files navigation

activeagents-telemetry

LLM tracing for Ruby apps. Reports what your app asked the model, how long it took, what it cost in tokens, and which tools ran — to the ActiveAgents platform or any self-hosted ActiveAgent dashboard.

Configuration guide → the wiki

Gems in this repo

GemUse it when
activeagents-telemetryShared core — wire format, configuration, delivery. Every adapter depends on it.
activeagents-telemetry-ruby_llmYour app calls models through RubyLLM.

Apps built on the ActiveAgent framework don't need an adapter — the framework reports telemetry on its own.

Quick start

# Gemfilegem"activeagents-telemetry-ruby_llm"
# config/initializers/telemetry.rbRubyLLM.configuredo |config|
config.instrumenter=ActiveSupport::Notifications# RubyLLM 1.x; 2.x wires this up in RailsendActiveAgents::Telemetry.configuredo |config|
config.api_key=ENV["ACTIVEAGENTS_API_KEY"]config.service_name="my-app"endActiveAgents::Telemetry::RubyLLM.subscribe!

That's it. Every chat turn now reports as a trace.

What a trace looks like

One trace per conversation turn:

root SupportBot.respond 1,240ms OK
└─ llm llm.generate gpt-4o 2 rounds 1,180ms 42 tokens
└─ tool tool.search_docs 310ms OK

Prompts, completions, and tool arguments/results are sent only when capture_bodies is enabled (off by default). Error messages are truncated and backtraces are never transmitted.

Self-hosting

Point the endpoint at your mounted dashboard — same gems, same wire format:

config.endpoint="https://your-app.example.com/active_agent/api/traces"

Development

bundle install
bundle exec rake test_all # core + every adapter
bundle exec rake build_all # build all gems into pkg/

License

MIT — see LICENSE.txt.

About

LLM tracing for Ruby — report RubyLLM and ActiveAgent traces to ActiveAgents or a self-hosted dashboard

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages