-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix: add ottl metric condition to expr package for use in sampling processor #1878
Conversation
…ic condition in sampling processor
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.
Looks good, just one comment on the go.mod
if cfg.Condition == "" { | ||
cfg.Condition = "true" | ||
} |
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.
Do we ever hit this case? We already set the default to this in createDefaultConfig. IMO we shouldn't modify the config in a "Validate" function, I wouldn't expect validation to mutate the config.
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.
Good point, I wasn't sure how the condition field would be set if it isn't passed in from the config, but I see now with some testing that it gets set to the default. Change has been pushed 👍
Proposed Change
Adds OTTL Metric Condition, Statement, and Expression to the expr package. Changes the sampling processor to use a metric based condition instead of datapoint based condition.
Followup to: #1877
Checklist