opentelemetry-collector-contrib icon indicating copy to clipboard operation
opentelemetry-collector-contrib copied to clipboard

[pkg/ottl] Add `IsList` Converter

Open TylerHelmuth opened this issue 2 years ago • 3 comments
trafficstars

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.

TylerHelmuth avatar Oct 20 '23 00:10 TylerHelmuth

I'd like to do this one at contribfest!

strawgate avatar Nov 07 '23 17:11 strawgate

Thanks @strawgate!

codeboten avatar Nov 08 '23 21:11 codeboten

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.

github-actions[bot] avatar Feb 12 '24 03:02 github-actions[bot]

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.

github-actions[bot] avatar Apr 15 '24 04:04 github-actions[bot]

@strawgate Just checking in, are you still able to work on this?

evan-bradley avatar Apr 15 '24 16:04 evan-bradley

@evan-bradley sorry, was on partial leave for a little bit. I'll pick this up this week!

strawgate avatar Apr 15 '24 16:04 strawgate

Re-opened PR at https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/32392

strawgate avatar Apr 15 '24 19:04 strawgate

The pr has been merged so I think this can be closed!

strawgate avatar Apr 20 '24 00:04 strawgate