-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[internal/filter] filtermetric to filterottl bridge (#23141)
**Description:** This PR adds a bridge between `filtermetric.NewSkipExpr` and `filterottl.NewBoolExprForMetric` behind a feature gate. With the feature gate enabled, any component using `filtermetric.NewSkipExpr` will start using OTTL behind the scenes. In addition, the filterprocessor's implementation of `newSkipResExpr`, which is a skip expression for resources, is bridged to `filterottl.NewBoolExprForResource`. Since this implementation exists only for filtering metrics, the same feature gate is used for both. While investigating the existing `internal/filtermetric` uses with filterprocessor and attributesprocessor I found that: - The attributes processor does not support Expressions or Resource Attributes. The readme claims that it does, but the implementation does not support it (and there are no tests). This bridge DOES NOT rectify that. - The filterprocessor allows filtering by resource attributes, expressions, and metric name. Unlike it's implementation for filtering spans and logs, the filterprocessor handles filtering spans at the Resource level loop. This is the most performant solution, and how OTTL likes to think about the problem, but it results in a different pattern than filtering spans and logs. This bridge DOES NOT attempt to move the resource implementation into `internal/filtermetric`. **Link to tracking Issue:** Related to #18643 Related to #18642 Depends on: - [x] #23142 **Testing:** Added tests comparing the output of the existing config and the bridge.
- Loading branch information
1 parent
f1068be
commit 46d03a0
Showing
10 changed files
with
554 additions
and
61 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
Oops, something went wrong.