AgentObs provides a drop-in tracer for Jido that automatically instruments composer events with OpenTelemetry spans and OpenInference semantic conventions.
- Overview
- Installation
- Configuration
- How It Works
- Event Mapping
- Metadata Translation
- Viewing Traces
- Advanced Usage
If you're using Jido's composer to orchestrate agent, LLM, and tool calls,
AgentObs.JidoTracer bridges those telemetry events into AgentObs. This gives
you full observability in Arize Phoenix (or any OpenTelemetry backend) with zero
manual instrumentation of your Jido workflows.
Key benefits:
- Zero-code instrumentation for Jido composer workflows
- Automatic parent-child span nesting
- OpenInference semantic conventions for rich visualization in Phoenix
- Graceful error handling (never crashes your application)
Add both dependencies to mix.exs:
def deps do
[
{:agent_obs, "~> 0.1.3"},
{:jido, "~> 2.0"}
]
endjido is an optional dependency of agent_obs. The AgentObs.JidoTracer
module is only available when Jido is installed.
Point Jido's observability config at the tracer:
# config/config.exs
config :jido, :observability,
tracer: AgentObs.JidoTracer
# Also configure AgentObs handlers as usual
config :agent_obs,
enabled: true,
handlers: [AgentObs.Handlers.Phoenix]Make sure your OpenTelemetry exporter is configured to send spans to your backend:
# config/runtime.exs
config :opentelemetry,
span_processor: :batch,
resource: [service: [name: "my_jido_app"]]
config :opentelemetry_exporter,
otlp_protocol: :http_protobuf,
otlp_endpoint: System.get_env("ARIZE_PHOENIX_OTLP_ENDPOINT", "http://localhost:6006")That's it. All Jido composer events will now appear as traced spans.
AgentObs.JidoTracer implements the Jido.Observe.Tracer behaviour, which
Jido calls automatically during composer execution:
span_start/2- Called when a composer event begins. Creates an OpenTelemetry span with attributes translated to OpenInference conventions.span_stop/2- Called when the event completes. Sets result attributes and ends the span.span_exception/4- Called on errors. Records the exception on the span and sets error status.
Parent-child relationships are maintained automatically through OpenTelemetry context propagation, so nested agent > LLM > tool calls appear correctly in trace visualizers.
Jido event prefixes are classified into AgentObs event types:
| Jido Event Prefix | AgentObs Type | Span Name Example |
|---|---|---|
[:jido, :composer, :agent, ...] |
:agent |
"weather_assistant" |
[:jido, :composer, :llm, ...] |
:llm |
"gpt-4o #2" |
[:jido, :composer, :tool, ...] |
:tool |
"get_weather" |
[:jido, :composer, :iteration, ...] |
:chain |
"iteration 3" |
| Any other prefix | :agent |
"agent" |
The tracer automatically maps Jido metadata fields to AgentObs format:
| Jido Field | AgentObs Field | Notes |
|---|---|---|
:query |
:input |
Falls back to :input |
:name |
:name |
Falls back to :agent_module |
:model |
:model |
Optional |
:result |
:output |
On stop, falls back to :output |
| Jido Field | AgentObs Field | Notes |
|---|---|---|
:model |
:model |
Defaults to "unknown" |
:input_messages |
:input_messages |
Preferred |
:conversation |
:input_messages |
Normalized to %{role, content} maps |
:iteration |
:iteration |
Appended to span name |
:tokens |
:tokens |
On stop |
| Jido Field | AgentObs Field | Notes |
|---|---|---|
:tool_name |
:name |
Falls back to :node_name, :name |
:arguments |
:arguments |
Falls back to :params |
:result |
:result |
On stop, falls back to :output |
Start a local Arize Phoenix instance:
docker run -p 6006:6006 -p 4317:4317 arizephoenix/phoenix:latestNavigate to http://localhost:6006 to see your Jido workflows as nested traces:
weather_assistant (agent)
├── gpt-4o #1 (llm)
├── get_weather (tool)
└── gpt-4o #2 (llm)
You can use AgentObs.JidoTracer for Jido workflows while using the
AgentObs.trace_* helpers for non-Jido code in the same application:
def my_workflow(query) do
# Manual instrumentation for the outer operation
AgentObs.trace_agent("my_workflow", %{input: query}, fn ->
# Jido composer is automatically traced via JidoTracer
{:ok, result} = Jido.Composer.run(my_composer, query)
{:ok, result}
end)
endThe tracer is designed to never crash your application. If span creation or attribute translation fails, a warning is logged and execution continues normally:
[warning] AgentObs.JidoTracer span_start failed: %RuntimeError{message: "..."}
- Getting Started - Basic AgentObs setup
- Instrumentation Guide - Manual instrumentation patterns
- ReqLLM Integration - ReqLLM auto-instrumentation
- Configuration - Advanced configuration options