open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
2.91k stars 2.27k forks source link

`hec_metadata_to_otel_attrs` option is confusing on exporter/splunkhec #35092

Open bderrly opened 1 week ago

bderrly commented 1 week ago

Component(s)

exporter/splunkhec

Describe the issue you're reporting

The config option hec_metadata_to_otel_attrs is confusing when used with the splunkhec exporter as the actual effect is the opposite, i.e. taking otel attributes and using them as HEC metadata when sending to some destination.

https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/bd66cebb0a7848c5e38a8d29a26532ee2c5a1d91/exporter/splunkhecexporter/config.go#L120

github-actions[bot] commented 1 week ago

Pinging code owners:

atoulme commented 1 week ago

Would you like to offer a PR to fix the naming?

bderrly commented 5 days ago

I could do that. Before I set out to do it, is there agreement that the naming is confusing enough that we should change it?

atoulme commented 4 days ago

Yes, I think so. As you change the name, we will want to mark the current field deprecated and keep it around for a little while, and introduce a new field. Best to discuss the name of the new field in this issue. I guess it should be otel_attrs_to_hec_metadata?

bderrly commented 2 days ago

I guess it should be otel_attrs_to_hec_metadata?

That is what I was thinking.