Repository navigation
feat(metrics): emit per-request metrics on the pass-through path - #81
Merged
Merged
Conversation
Add GuardFairing::with_metrics(MetricsCollector). A response Rocket produces for a request the guard let through now emits the reference collect_request_metrics samples: request_count, response_time (stopping when the response is produced, like the reference stopping at response start) and error_rate for a >= 400 status. Guard refusals, the CORS preflight and redirect answers, 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.
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 #80
feat(metrics):GuardFairing::with_metrics(MetricsCollector). A response Rocket produces for a request the guard let through emits the referencecollect_request_metricssamples:request_count,response_time(from the request reaching the fairing until the response is produced, like the reference stopping at response start) anderror_ratefor a>= 400status, tagged with the path and method. Guard refusals, the CORS preflight and HTTPS redirect answers, andexclude_pathsbypasses emit nothing. The collector owns theagent_enable_metricsgate and the transport, and the fairing 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.