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

Add `otlp_grpc` alias for `otlp` exporter

Open codeboten opened this issue 3 weeks ago • 5 comments
trafficstars

Component(s)

No response

Describe the issue you're reporting

The OTLP gRPC exporter is currently configured via otlp, which is different than the otlphttp exporter. This has led to end user confusion. I'm suggesting supporting the key otlp_grpc to configure this exporter to make the protocol explicit. This would align with the configuration schema:

https://github.com/open-telemetry/opentelemetry-configuration/blob/26f29f8119042c05fd3e08317c025030e79476d9/schema/logger_provider.json#L73-L84

An alternative would be to follow the same path as we did for the log exporter when it was renamed to debug exporter and eventually deprecated the otlp exporter.

Alternatively we could decide to not support this and document that this configuration will be different.

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

codeboten avatar Oct 29 '25 19:10 codeboten

Will add for context that the configuration working group moved to split the exporters in this PR https://github.com/open-telemetry/opentelemetry-configuration/pull/146

codeboten avatar Oct 29 '25 19:10 codeboten

The omission of grpc in the exporter name has resulted in confusion for many people over the years who did not realize they were using grpc instead of http. Although it may be challenging to make this kind of change since it is such a critical component and so many people already rely on it today, it is a necessary fix to reduce confusion and it is ideal to change for 1.0 - especially to keep things more aligned with the configuration spec.

JamieDanielson avatar Oct 29 '25 19:10 JamieDanielson

Is there a particular reason this cannot match what the otlpreceiver does? i.e. one receiver that contains configuration options for both protocols. I always was curious why otlphttpexporter is separate whereas http is built right into the otlpreceiver.

braydonk avatar Oct 29 '25 20:10 braydonk

@braydonk it looks like the original issue suggests it could have been part of the same exporter.

Note that the configuration working group ended up choosing to go away from specifying the protocol and sharing the name otlp for the exporter configuration

codeboten avatar Oct 29 '25 20:10 codeboten

I agree that the otlp exporter only supporting gRPC is confusing. I'd be fine with either having an otlp exporter that handles both HTTP and gRPC, or renaming otlp to otlp_grpc (and otlphttp to otlp_http). Slightly prefering the latter option for naming compatibility with the configuration schema.

If we decide to have a single otlp exporter for both gRPC and HTTP, I think HTTP should be the default, and that's a change that's much more significant than a rename.

andrzej-stencel avatar Oct 30 '25 09:10 andrzej-stencel

Hi @codeboten , I'd like to work on this issue and this one.

mbaykara avatar Nov 15 '25 00:11 mbaykara