Repository navigation
Conversation
…write queue telemetry file - egress-ledger.json v4: finished days under "days" (RetentionDays, today included), per-client and interactive "ips" - daily table rows carry an Ips column (per client, interactive, and the instance merge of API clients) - RateLimitPartitionKey.ClientAddress: first X-Forwarded-For hop with the port dropped, else the socket peer - queue-telemetry.json beside the ledger every stats sample: worker/job/limiter metrics and durable run counts - stats-history.jsonl moves from the app directory to the log directory beside the ledger
Zacgoose
marked this pull request as ready for review
October 23, 2026 15:03
JohnDuprey
approved these changes
Oct 23, 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.
This pull request introduces several important enhancements and fixes to the API response caching and egress tracking system. The main changes include: extending the egress ledger to track per-client IP statistics and maintain a multi-day history in the local file, clarifying cache and retention policy behaviors, and adding more explicit cache invalidation controls. These changes improve observability, enable finer-grained analytics, and align the retention of local and table-based egress data.
Egress Ledger Enhancements:
EgressLedgernow tracks statistics not only by client/app ID but also by client IP address, allowing for more granular monitoring and reporting of API usage and rate limiting. This includes updates toRecord,RecordInteractive, andRecordShedmethods and the underlying data structures. [1] [2] [3] [4] [5] [6] [7] [8]PruneHistorymethod, and the local file format is updated to version 4 to support this. [1] [2] [3] [4] [5]Configuration and Policy Clarifications:
EgressLimitSettings.RetentionDaysdocumentation is clarified to specify that the retention period applies to both the database table and the local ledger file.EndpointCachingenum is introduced to allow endpoints to explicitly declare their caching policy (convention-based, always cached, or never cached), and theCraftEndpointAttributeis extended to use this. [1] [2]Cache and Invalidation Improvements:
CacheServicenow provides a method to explicitly invalidate cache entries via a query parameter, supporting on-demand cache refresh for clients.CraftResultclass exposes methods for serializing/deserializing cacheable responses, ensuring only safe (JSON, 2xx/3xx) responses are stored in the cache.Internal Refactoring and Maintenance:
These changes collectively improve the robustness, flexibility, and transparency of API usage tracking and caching in the system.