feat: serve /v1/usage from rossoctl authbridge exec - #84
Open
esnible wants to merge 1 commit into
Open
Conversation
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>
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.
rossoctl authbridge execbuilt its session API without a usage aggregator, soGET /v1/usage404ed while the same endpoint worked inauthbridge-proxy.usage.Newalongside the session store and registers it as a store recorder.sessionapi.WithUsage— the option that registers the route.authlibto pick up theusagepackage (the pinned20260902predates it).No
Pricer, so cost fields stay absent and the response reportspriced:false, matchingauthbridge-proxy.Verification
gofmt,go mod tidy,vet,build,testall clean. Against a runningexec: 200 with 12 buckets for a 1h window at 5m, and 4 requests through the forward proxy recordedtotals.requests=4with latency mean/stddev. Withsession.enabled: falsethe session API does not start, so the route stays absent.🤖 Generated with Claude Code