open-telemetry / opentelemetry-collector-contrib

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

[exporter/splunkhec] Pass through instrumentation scope to Splunk #34165

Open John-Teng opened 2 months ago

John-Teng commented 2 months ago

Component(s)

exporter/splunkhec

Is your feature request related to a problem? Please describe.

I want to propagate the logger name through to Splunk via the OTEL collector. The otel log4j appender sets the logger name as the Instrumentation Scope name. However, the instrumentation scope is not exported to Splunk.

The OTEL spec states that instrumentation scope should be set on some KV pair when bridging to a non OTLP format, so I would expect that the scope name is set as a field.

Describe the solution you'd like

The instrumentation scope name and version to be set as KV pairs in the Splunk event

Describe alternatives you've considered

No response

Additional context

No response

github-actions[bot] commented 2 months ago

Pinging code owners:

John-Teng commented 2 months ago

I have provided sample code in the draft PR. It doesn't cover the trace / metric paths but those should be similar.

atoulme commented 2 months ago

Feel free to offer a change to the spec in the HEC mapping here: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model-appendix.md#splunk-hec

atoulme commented 2 months ago

I think the changes you propose are OK, please make sure your PR covers all signals, thanks.

atoulme commented 1 week ago

@John-Teng I haven't heard back from you. Please consider opening an issue against the specification repository to update the mapping and link it back to this issue.