opentelemetry-collector-contrib
opentelemetry-collector-contrib copied to clipboard
[pkg/ottl] Add `IsList` Converter
Component(s)
pkg/ottl
Is your feature request related to a problem? Please describe.
OTTL has no way to check if a value is a pcommon.Slice type.
Describe the solution you'd like
Add a new Converter, IsList that returns true if the given type is a pcommon.Slice (or equivalent type). It will work similarly to the IsMap function.
The implementing PR should
- [ ] Implement the function
- [ ] Add new unit tests for the function
- [ ] Add the function to
pkg/ottl/ottlfuncs/functions.go - [ ] Update the README at
pkg/ottl/ottlfuncs/README.md
Implementing this function will mean introducing a new PSliceGetter interface, similar to the PMapGetter interface. If the type is a slice but cannot be converted to a pcommon.Slice, then an error should be returned.
I'd like to do this one at contribfest!
Thanks @strawgate!
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
Pinging code owners:
- pkg/ottl: @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley
See Adding Labels via Comments if you do not have permissions to add labels yourself.
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
Pinging code owners:
- pkg/ottl: @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley
See Adding Labels via Comments if you do not have permissions to add labels yourself.
@strawgate Just checking in, are you still able to work on this?
@evan-bradley sorry, was on partial leave for a little bit. I'll pick this up this week!
Re-opened PR at https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/32392
The pr has been merged so I think this can be closed!