-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[processor/tailsamplingprocessor] Is it possible to pass an array of numbers to policy #22849
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I would like to check if the OTTL policy could meet your needs later. I think it should work like:
But maybe we could write a more concise OTTL expression. |
@jiekun It's better if we have a condition that accepted an array of numbers. |
@koungkub I think OTTL could handle array. You could check it here: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl#lists I'm sorry that I cannot do some test myself yesterday due to limited time. I will add some test example. And maybe you could read the OTTL doc to see if it met your expectation as well. |
Thanks |
Alright I think the boolean expression support those operation:
The list value is acceptable for an OTTL function tho. I would like to ping OTTL master @TylerHelmuth for help. :P |
OTTL supports passing lists in the grammar, but doesn't have If I am understanding the problem statement correctly, you want to check if an attribute with a numeric value is one of several possible values. This is achievable with the OTTL condition policy exactly as @jiekun suggested:
If any of the statements is true the policy will resolve to true. This is functionally equivalent to
With some improvements to |
@jiekun @TylerHelmuth Thank you so much. It's working correctly. |
@TylerHelmuth I agree with you about the precise statement of ottl. It should be accepted array of either strings or numbers |
@koungkub if you'd like please open a new issue for |
Component(s)
processor/tailsampling
Describe the issue you're reporting
I'd like to pass an array of numbers on the numeric_attribute policy. for instance
The text was updated successfully, but these errors were encountered: