feat: Telemetry Extension β Phase 1 (structured event capture)#47
Merged
dgarson merged 1 commit intoobservability/mainfrom Feb 22, 2026
Merged
Conversation
Adds extensions/telemetry/ β a pure extension that captures structured telemetry events from agent sessions and writes them to JSONL. Event hooks: - session_start: via plugin lifecycle hook - session_end: via plugin lifecycle hook (duration, message count) - agent_end: via plugin lifecycle hook (success/fail, duration, errors) - model_usage: via onDiagnosticEvent (tokens, model, provider, cost) Sink: configurable file (default ~/.openclaw/telemetry/events.jsonl) and/or stdout. Non-blocking, best-effort writes. No changes to core src/ β extension-only, additive. No new root dependencies. Phase 2 will add SQLite storage, CLI commands, and agent query tools.
dgarson
added a commit
that referenced
this pull request
Feb 22, 2026
β¦Editor (Piper) AgentScheduler: 7 seed schedules, list+calendar toggle, master/detail, run now/edit/delete TokenLedger: 10 ledger entries, cost by agent+model breakdown, 7-day bar chart ThemeEditor (Piper): preset themes, live preview panel, CSS var export; fixed TS errors Sprint total: 47 views
dgarson
added a commit
that referenced
this pull request
Feb 22, 2026
ThemeEditor: now fully wired into nav + router PermissionsManager (Reed): permission matrix, 5 agents, edit mode toggle Sprint total: 48 views
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
extensions/telemetry/β a pure plugin extension that captures structured telemetry events from agent sessions and writes them as JSONL.Spec:
/Users/openclaw/.openclaw/workspace/drew/TELEMETRY_SPEC.md(Phase 1 scope only)What it does
Hooks into four event sources and emits structured JSON events:
session_startsession_startlifecycle hooksession_endsession_endlifecycle hookagent_endagent_endlifecycle hookmodel_usageonDiagnosticEvent(model.usage)Sink
Events write to a configurable JSONL file (default:
~/.openclaw/telemetry/events.jsonl) and/or stdout. Non-blocking, best-effort writes β never blocks the agent runtime.Config
Files
extensions/telemetry/index.tsβ Plugin entry, registers serviceextensions/telemetry/src/types.tsβ Event schema + config typesextensions/telemetry/src/sink.tsβ JSONL file/stdout writerextensions/telemetry/src/hooks.tsβ Hook registrationsextensions/telemetry/openclaw.plugin.jsonβ Plugin manifestextensions/telemetry/package.jsonβ Package configextensions/telemetry/README.mdβ DocumentationConstraints met
src/Phase 2 (future)
SQLite storage, CLI commands (
openclaw telemetry costs/errors/sessions), agent query tools, cost estimation with pricing table, retention/cleanup.