Fix session metric and add context window utilization tracking#1
Open
hev wants to merge 1 commit intoColeMurray:mainfrom
Open
Fix session metric and add context window utilization tracking#1hev wants to merge 1 commit intoColeMurray:mainfrom
hev wants to merge 1 commit intoColeMurray:mainfrom
Conversation
- Fix session count showing 0: derive from existing metrics since claude_code_session_count_total is not emitted by Claude Code - Add context window utilization panel to dashboard overview section - Document derived metrics including context window % calculation - Adjust overview panel widths to fit 5 stat panels 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Slack: https://hevmindworkspace.slack.com/archives/C0A6L0UFU6R/p1767715841456769
zyd14
added a commit
to empiricotx/claude-code-otel
that referenced
this pull request
Feb 20, 2026
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
Fix session count showing 0: The
claude_code_session_count_totalmetric is documented but not actually emitted by Claude Code. Changed query to derive session count from existing metrics usingcount(count by (session_id)(claude_code_cost_usage_USD_total)).Add context window utilization panel: New stat panel in dashboard overview showing max context window usage as a percentage with color-coded thresholds (green <50%, yellow 50-70%, orange 70-85%, red >85%).
Document derived metrics: Added new section to
CLAUDE_OBSERVABILITY.mdexplaining how to calculate context window utilization from raw telemetry data, including model context limits.Test plan
🤖 Generated with Claude Code