Skip to content

feat: export attribution info via Prometheus endpoint#170

Merged
mcowger merged 1 commit intomainfrom
claude/issue-168-20260415-1948
Apr 15, 2026
Merged

feat: export attribution info via Prometheus endpoint#170
mcowger merged 1 commit intomainfrom
claude/issue-168-20260415-1948

Conversation

@mcowger
Copy link
Copy Markdown
Owner

@mcowger mcowger commented Apr 15, 2026

Adds four new Prometheus counters exposing usage broken down by both api_key and attribution suffix (the part after : in the key string):

  • plexus_api_key_attribution_requests_total
  • plexus_api_key_attribution_tokens_total
  • plexus_api_key_attribution_cost_usd_total
  • plexus_api_key_attribution_errors_total

Closes #168

Generated with Claude Code

Adds four new Prometheus counters that expose usage broken down by both
api_key and attribution suffix (the part after ':' in the key string):

- plexus_api_key_attribution_requests_total
- plexus_api_key_attribution_tokens_total
- plexus_api_key_attribution_cost_usd_total
- plexus_api_key_attribution_errors_total

This allows Grafana queries like
  plexus_api_key_attribution_requests_total{api_key="amolith"}
to render a per-suffix breakdown graph for a single key.

Closes #168

Co-authored-by: Matt Cowger <mcowger@users.noreply.github.com>
@mcowger mcowger merged commit d14a5a2 into main Apr 15, 2026
1 check passed
github-actions bot pushed a commit that referenced this pull request Apr 16, 2026
feat: export attribution info via Prometheus endpoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export attribution info via Prometheus endpoint

1 participant