-
Notifications
You must be signed in to change notification settings - Fork 888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add attribute filtering function to View metric data stream configuration #3550
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d0bc938
Add attr filter func to view config
MrAlias b989c6e
Add change to changelog
MrAlias c114b35
Merge branch 'main' into view-attr-filter-func
MrAlias 21c5aac
Update PR number
MrAlias 4377d1b
Specify behavior for multiple attr conf methods
MrAlias a06f786
Merge branch 'main' into view-attr-filter-func
MrAlias 728a24a
Merge branch 'main' into view-attr-filter-func
MrAlias db20704
Merge branch 'main' into view-attr-filter-func
MrAlias 0db7055
Merge branch 'main' into view-attr-filter-func
MrAlias 60ece05
Merge branch 'main' into view-attr-filter-func
MrAlias File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question I posted applies here as well. What do we gain from allowing you to filter on key-value pairs as opposed to just the keys?
We could consider taking this a step further and re-adding the "AttributeProcessor" concept, which is defined as:
But if we did this, I'd say we should take it even further, and add a MeasurementProcessor:
This would allow users to transform attributes before aggregation, including enriching with attributes from context. It would also allow for filtering measurements whose values are outside some acceptable range. It would also allow for converting the units of values.
So more flexibility. I'm in favor of going all the way in terms of flexibility and adding MeasurementProcessor, rather than adding more constrained tools in a piecemeal fashion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That does look more flexible and useful to users. I am in favor of going that direction as well. I can close this and open something to shift there if others agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we switch to the
MeasurementProcessor
, would it overlap with the exitingView
attribute key filter? Could we make that part of the view stream configuration parameters optional to implement (assuming they already aren't 🤷 😉 #3524 (comment))?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SO I think the big difference here is where the config is located.
I want a MeasurementProcessor, but I also want more flexible attributes processing on views. View come with an implicit filter for where they apply. I'm not sure I want a measurement processor on views or as a global thing.
@jack-berg what's your thinking here for where MeasurementProcessor lives? can I make a global one, like Log/Span processsor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On this topic, I support the idea of a MeasurementProcessor. Lightstep has been pushing on an OTel-Collector pipeline recently and one of the features we wanted to inject via the OTel SDK is a way to extend the attribute set w/ context variables. The same functionality should be able to remove attribute-values, (see it in draft form),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was imagining it was a view level configuration, allowing it to apply broadly to many instruments or narrowly to just one.
If we make measurement processor a view level config option, we can think of the existing view attribute key filter as shorthand for a measurement processor which only retains certain attribute keys. Would need to decide what to do when a key filter and a measurement processor are configured, as we could either reject that configuration as invalid, or apply one after the other sequentially based on which was registered first.