-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[pkg/ottl] Allow indexing maps and slices with dynamic values #36644
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Pinging code owners for pkg/ottl: @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley. See Adding Labels via Comments if you do not have permissions to add labels yourself. For example, comment '/label priority:p2 -needs-triaged' to set the priority and remove the needs-triaged label. |
Dynamic indexing in OTTL is definitely a language feature we’d like. |
I would like to take a look at this if possible |
Hello! The PR should be ready, please have a look #36719 |
Component(s)
processor/transform
Is your feature request related to a problem? Please describe.
I want to set a new key-value pair attribute using the value of another attribute
Option 1
Option 2
When I use option 1 got error
2024/12/02 14:53:40 collector server run finished with error: invalid configuration: processors::transform/combine_scope_type_and_scope_value: unable to parse OTTL statement "set(attributes[attributes[\"scope.type\"]], attributes[\"scope.value\"]) where attributes[\"scope.type\"] != nil and attributes[\"scope.value\"] != nil": statement has invalid syntax: 1:15: unexpected token "[" (expected ")" Key*)
Alternative is
But I also have error
The final effect should be
scope.type = enviroment
scope.value = dev
And addition new key-value which will be combination of scope.type and scope.value
enviroment = dev
Describe the solution you'd like
See up
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: