forked from grafana/tempo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[metrics-generator] filter out spans based on policy (grafana#2274)
* First pass at span filtering Signed-off-by: Zach Leslie <[email protected]> * Validate the spanmetrics filteirng config on startup Signed-off-by: Zach Leslie <[email protected]> * Give some hope that we return a true match Signed-off-by: Zach Leslie <[email protected]> * Drop unused argument service name and rely on attributes Signed-off-by: Zach Leslie <[email protected]> * Handling a few intrinsics Signed-off-by: Zach Leslie <[email protected]> * Include documentation for spanmetrics filtering policies Signed-off-by: Zach Leslie <[email protected]> * Update docs/sources/tempo/metrics-generator/span_metrics.md Co-authored-by: Kim Nylander <[email protected]> * Update docs/sources/tempo/metrics-generator/span_metrics.md Co-authored-by: Kim Nylander <[email protected]> * Update docs/sources/tempo/metrics-generator/span_metrics.md Co-authored-by: Kim Nylander <[email protected]> * Update docs/sources/tempo/metrics-generator/span_metrics.md Co-authored-by: Kim Nylander <[email protected]> * Update docs/sources/tempo/metrics-generator/span_metrics.md Co-authored-by: Kim Nylander <[email protected]> * Update docs/sources/tempo/metrics-generator/span_metrics.md Co-authored-by: Kim Nylander <[email protected]> * Adjust filter policy to split policies during New() Signed-off-by: Zach Leslie <[email protected]> * Update test for intrinsic Signed-off-by: Zach Leslie <[email protected]> * Include benchmark and supporting span generator Signed-off-by: Zach Leslie <[email protected]> * Include metric for counting spans that have been filtered out Signed-off-by: Zach Leslie <[email protected]> * Include config warning when unsupported intrinic is used Signed-off-by: Zach Leslie <[email protected]> * Relocate spanmetrics.FilterPolicy to sharedconfig package and implement overrides Signed-off-by: Zach Leslie <[email protected]> * Include sharedconfig pacakge Signed-off-by: Zach Leslie <[email protected]> * Update modules/generator/processor/spanmetrics/spanmetrics.go Co-authored-by: Joe Elliott <[email protected]> * Refactor spanfilter into its own package Signed-off-by: Zach Leslie <[email protected]> * Include tests for spanfilter.New() Signed-off-by: Zach Leslie <[email protected]> * Update spanmetrics processor to return an error for spanfilter error Signed-off-by: Zach Leslie <[email protected]> * Relocate config validation to spanfilter during New Signed-off-by: Zach Leslie <[email protected]> * Update tests for spanmetrics error return Signed-off-by: Zach Leslie <[email protected]> * Drop unused Signed-off-by: Zach Leslie <[email protected]> * Update docs to include nesting of filtering config Signed-off-by: Zach Leslie <[email protected]> * Exit early when attributes are unmatched Signed-off-by: Zach Leslie <[email protected]> * Exit early when intrinsics are not matched Signed-off-by: Zach Leslie <[email protected]> * Preallocate a couple variables Signed-off-by: Zach Leslie <[email protected]> * Add note about use of RandomBatcher Signed-off-by: Zach Leslie <[email protected]> * Update changelog * Drop TODO comment Signed-off-by: Zach Leslie <[email protected]> * Add back the lost metric during rebase Signed-off-by: Zach Leslie <[email protected]> * Fix policy override configuration Signed-off-by: Zach Leslie <[email protected]> * Include generator config test Signed-off-by: Zach Leslie <[email protected]> * Migrate the metric and expand reasons Signed-off-by: Zach Leslie <[email protected]> * Update tests for discardCounter Signed-off-by: Zach Leslie <[email protected]> * Include doc about which kinds are available for filtering Signed-off-by: Zach Leslie <[email protected]> * Spellcheck * Perform number matching for kind and status Signed-off-by: Zach Leslie <[email protected]> * Rename discardCounter to filteredSpansCounter Signed-off-by: Zach Leslie <[email protected]> * Improve error quality Signed-off-by: Zach Leslie <[email protected]> * Update error message in test Signed-off-by: Zach Leslie <[email protected]> --------- Signed-off-by: Zach Leslie <[email protected]> Co-authored-by: Kim Nylander <[email protected]> Co-authored-by: Joe Elliott <[email protected]>
- Loading branch information
1 parent
6e7cd10
commit 14848fd
Showing
16 changed files
with
2,314 additions
and
28 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.