Open TylerHelmuth opened 11 months ago
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:
See Adding Labels via Comments if you do not have permissions to add labels yourself.
Yes please, fix for this would be great.
I've been trying to figure out this issue for a half a day, until I found this just now. 😓 Now I have to figure out how to accomplish what I need in a different way.
The workaround for this issue is to use cache
. set(resource.attributes["my.environment.2"], Split(resource.attributes["host.name"],"-")[1])
becomes:
set(cache["temp"], Split(resource.attributes["host.name"],"-"))
set(resource.attributes["my.environment.2"], cache["temp"][1])
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:
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:
See Adding Labels via Comments if you do not have permissions to add labels yourself.
At a minimum, we should achieve type coverage for all types that OTTL supports. If possible, a generic solution would be nice, assuming we can do this with either reflection or some creative type casting.
I was just shown the scenario
set(resource.attributes["my.environment.2"], Split(resource.attributes["host.name"],"-")[1])
that produces an error:
Although the language does support indexing the return value of the Converter, it only supports indexing
pcommon.Slice
and[]any
, butSplit
returns a[]string
. We need to make indexing slices more generic. This might need to be its own issue. Related code: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/60430e1f4c2bdb8579fc080d5f3a6c8f15730a4b/pkg/ottl/expression.go#L98-L112Originally posted by @TylerHelmuth in https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/26108#issuecomment-1821560835