Repository navigation
Add debug logging for Auth0 rate limit budgets, pacing and circuit state - #35
Merged
Merged
Conversation
The rate limit machinery was silent: budgets, pacing delays and circuit transitions were invisible, so diagnosing rate limit behavior required correlating operator symptoms against the Auth0 tenant log. Log at debug level the budget every response reports (bucket, remaining, limit, reset), endpoint-to-bucket bindings as they are learned, and each pacing delay with the bucket state that produced it. Circuit transitions now log at warning when a circuit newly opens - distinguishing a received 429 from a preemptive open on an exhausted budget, which the reconcile-level warnings could not tell apart - and at debug when an open circuit is extended or closes. Enable per environment with Logging__LogLevel__Alethic.Auth0.Operator.RateLimiting=Debug.
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.
What
The rate limit machinery was silent — budgets, pacing delays, and circuit transitions were invisible from the operator log, so diagnosing rate limit behavior meant correlating operator symptoms against the Auth0 tenant log (as we did chasing the
api_limitevents).All loggers are optional constructor parameters, so existing tests and callers are untouched;
Auth0HttpClientProviderwires them fromILoggerFactory.Enabling
Per environment:
Logging__LogLevel__Alethic.Auth0.Operator.RateLimiting=Debug(the chart'soperator.envpassthrough works for this). Circuit open/close warnings appear at default levels.Testing
Full suite: 440 passed.