Skip to content

feat: serve /v1/usage from rossoctl authbridge exec - #84

Open
esnible wants to merge 1 commit into
mainfrom
feat-authbridge-exec-usage
Open

feat: serve /v1/usage from rossoctl authbridge exec#84
esnible wants to merge 1 commit into
mainfrom
feat-authbridge-exec-usage

Conversation

@esnible

@esnible esnible commented Sep 7, 2026

Copy link
Copy Markdown
Member

rossoctl authbridge exec built its session API without a usage aggregator, so GET /v1/usage 404ed while the same endpoint worked in authbridge-proxy.

  • Creates usage.New alongside the session store and registers it as a store recorder.
  • Passes sessionapi.WithUsage — the option that registers the route.
  • Bumps authlib to pick up the usage package (the pinned 20260902 predates it).

No Pricer, so cost fields stay absent and the response reports priced:false, matching authbridge-proxy.

Verification

gofmt, go mod tidy, vet, build, test all clean. Against a running exec: 200 with 12 buckets for a 1h window at 5m, and 4 requests through the forward proxy recorded totals.requests=4 with latency mean/stddev. With session.enabled: false the session API does not start, so the route stays absent.

🤖 Generated with Claude Code

The proxy exec starts built its session API without a usage aggregator,
so GET /v1/usage 404ed while the same endpoint worked in
authbridge-proxy. Creates usage.New alongside the session store,
registers it as a store recorder, and passes sessionapi.WithUsage —
the option that registers the route.

Bumps authlib to pick up the usage package (20260902 predates it).

No Pricer, so cost fields stay absent and the response reports
priced:false, matching authbridge-proxy.

Verified against a running exec: 200 with 12 buckets for a 1h window at
5m, and 4 requests through the forward proxy recorded totals.requests=4
with latency mean/stddev. With session.enabled:false the session API
does not start, so the route stays absent.

Assisted-by: Claude <noreply@anthropic.com>

Signed-off-by: Ed Snible <snible@us.ibm.com>
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.

1 participant