feat(observability): add HealthMetrics singleton for agent health tracking - #404
Open
telleroutlook wants to merge 1 commit into
Open
feat(observability): add HealthMetrics singleton for agent health tracking#404telleroutlook wants to merge 1 commit into
telleroutlook wants to merge 1 commit into
Conversation
…cking Closes #388 Adds a lightweight HealthMetrics singleton to track agent operational health at runtime: - HealthMetrics class (singleton) with counters for tool latency, failures, timeouts, policy denials, and token resource usage - getSnapshot() returns a read-only HealthSnapshot struct - Instrumented in ToolCallingAgent: guardrail tripwires (input/output/tool), node_error path, parallel tool path (latency + timeout detection), model_done resource usage - Cloudflare Worker health endpoint now includes metrics snapshot - 8 unit tests, all pass Manually implemented by operator — bot hit budget limit on this task.
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.
Closes #388
Adds a lightweight
HealthMetricssingleton to track agent operational health at runtime:HealthMetricsclass (singleton) with counters for tool latency, failures, timeouts, policy denials, and token resource usagegetSnapshot()returns a read-onlyHealthSnapshotstructToolCallingAgent: input/output/tool guardrail tripwires,node_errorpath, parallel tool path (latency timing + timeout/failure classification),model_donetoken usage/healthendpoint now includes ametricsfield with the live snapshotManually implemented by operator — bot hit budget limit on this task.