Agentic.Telemetry.Aggregator (agentic v0.2.2)

Copy Markdown

GenServer that maintains running aggregates of orchestration telemetry events.

Attaches to [:agentic, :orchestration, :turn] and [:agentic, :orchestration, :tool_executed] events and keeps per-(strategy, mode) counters.

Usage

Aggregator.summary(:default)
Aggregator.summary(:default, :agentic)

Summary

Functions

Returns a specification to start this module under a supervisor.

Reset all counters.

Return aggregated stats for a strategy.

Return aggregated stats for a strategy + mode pair.

Types

entry()

@type entry() :: %{
  turn_count: non_neg_integer(),
  total_duration_ms: non_neg_integer(),
  tool_call_count: non_neg_integer(),
  tool_success_count: non_neg_integer(),
  error_count: non_neg_integer()
}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

reset()

Reset all counters.

start_link(opts \\ [])

summary(strategy)

@spec summary(atom()) :: %{optional(atom()) => entry()}

Return aggregated stats for a strategy.

summary(strategy, mode)

@spec summary(atom(), atom()) :: entry()

Return aggregated stats for a strategy + mode pair.