Skip to content

docs: document the per-actor usage events channel - #1559

Merged
Jeff Luo (JeffLuoo) merged 1 commit into
agent-substrate:mainfrom
baizhenyu:stats-observability-docs
Sep 9, 2026
Merged

docs: document the per-actor usage events channel#1559
Jeff Luo (JeffLuoo) merged 1 commit into
agent-substrate:mainfrom
baizhenyu:stats-observability-docs

Conversation

@baizhenyu

Copy link
Copy Markdown
Collaborator

Documents the per-actor usage events channel that #1206 added, closing the docs request from that review.

New Per-Actor Usage Events section in the logging guide:

  • an example record and the consumer contract (filter on msg + kind; identity rides the same label group as lifecycle events and container logs, so the guide's existing query dimensions apply unchanged, and one labels."ate.actor.uid" filter returns an actor's output, transitions, and usage interleaved);
  • per-field semantics, including the part consumers must not get wrong: memory_current_bytes/memory_working_set_bytes are point-in-time, while memory_peak_bytes/cpu_usage_usec accumulate within an epoch whose boundary depends on source (cgroup restarts on restore, guest-agent survives it) — so window CPU is the increase between samples, never a sum;
  • the sampling knob (--actor-stats-poll-interval) and the delivery contract (best-effort behind a bounded queue, independent of --log-level);
  • the cardinality rule in bold: log-based metrics over these events must never label by actor identity.

The metrics section now names the ate.actor.stats.* instruments in its registry pointer and cross-links here for per-actor detail.

Every technical claim is checked against the code and the WorkloadStatsSample proto contract (epoch scoping, the memory.peak/Linux 5.19 caveat, trace-context absence, drop-warning text, flag semantics).

The observability guide covered the actor stats metrics only through
the registry pointer; the events channel -- the per-actor half of the
cardinality split -- had no documentation at all.

Add a Per-Actor Usage Events section to the logging guide: an example
record, how to filter (msg plus kind, with the identity label group
shared with lifecycle events and container logs so the existing query
dimensions apply unchanged), what each measurement means -- the
point-in-time fields versus the two that accumulate within an epoch,
whose boundary depends on the source -- the sampling knob, and the
delivery contract (best-effort behind a bounded queue, independent of
--log-level). Close with the rule consumers must not break: a
log-based metric over these events must never label by actor identity,
which is exactly the cardinality the split keeps out of the TSDB.

Cross-link from the metrics section, which names the ate.actor.stats.*
instruments and points here for per-actor detail.
Comment thread docs/observability.md
@JeffLuoo
Jeff Luo (JeffLuoo) merged commit e0e4bd5 into agent-substrate:main Sep 9, 2026
9 checks passed
@baizhenyu
Tim Bai (baizhenyu) deleted the stats-observability-docs branch September 9, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/observability kind/docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants