Repository navigation
feat(metrics): emit per-request metrics on the pass-through path - #80
Merged
Merged
Conversation
Add GuardTransform::with_metrics(MetricsCollector). A response the next service produces for a request the guard let through now emits the reference collect_request_metrics samples: request_count, response_time (stopping when the response head is back, like the reference stopping at response start) and error_rate for a >= 400 status. Guard blocks and exclude_paths bypasses emit nothing.
…syntax The guard-core-rs engine is adding fields to DetectionExclusionConfig. The spread keeps this literal compiling against both the current engine and the one with the new field.
rennf93
force-pushed
the
feat/request-metrics
branch
from
October 15, 2026 04:49
aa60b2e to
c33e03d
Compare
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.
Closes #79
feat(metrics):GuardTransform::with_metrics(MetricsCollector). A response the next service produces for a request the guard let through emits the referencecollect_request_metricssamples:request_count,response_time(from the request reaching the guard until the response head is back, like the reference stopping at response start) anderror_ratefor a>= 400status, tagged with the path and method. Guard blocks andexclude_pathsbypasses emit nothing. The collector owns theagent_enable_metricsgate and the transport, and the transform owns no agent slot, so the caller supplies the collector.fix(config): theDetectionExclusionConfigliteral infrom_security_confignow spreads..DetectionExclusionConfig::default(). The open guard-core-rs PR fix(detection): port the verified guard-core reference fixes (passive log reason, semantic header opt-out, Cookie pair scan) guard-core-rs#137 adds a field to that struct, and this keeps the adapter compiling against both the current engine and the new one.