Skip to content

[feature request] Support Service Discovery configuration standards for OTLP exporter endpoint #7283

@julealgon

Description

@julealgon

Package

OpenTelemetry.Exporter.OpenTelemetryProtocol

Is your feature request related to a problem?

We would like to centrally configure the OTLP endpoints, both gRPC as well as http, then have each application use the endpoint that makes sense for it based on the current protocol configuration.

Since 1.12, .NET Framework apps use http by default, whereas modern .NET uses gRPC. This breaks our centralized configuration today as it is not possible to define the 2 endpoints globally as the only setting that is supported today is OTEL_EXPORTER_OTLP_ENDPOINT.

What is the expected behavior?

I'd propose supporting Service Discovery for OTLP endpoints so that we could define them like so:

"Services": {
  "otlp-receiver": {
    "grpc": ["<our_server>:4317"],
    "http": ["<our_server>:4318"]
  }
}

Then, the exporter would use

  • grpc://otlp-receiver when configured with gRPC protocol
  • https+http://otlp-receiver when configured with http protocols

Which alternative solutions or features have you considered?

We don't really have any alternative today other than overriding our global endpoint config in many places so that all of our NET Framework apps get the http endpoint. This will require this override to be added to dozens of places today.

Alternatively, we could rely on custom labels in Azure AppConfig to provide one or the other, but this would similarly require changes to all of our .NET Framework applications to provide such label.

We will likely end up implementing this Service Discovery approach by ourselves as an extension today.

Additional context

I'm not exactly sure how this would interact/conflict with the upcoming "declarative config".

I've also opened this other issue which is related and would provide a different means to solve this at a more basic level:

The otlp-receiver identifier in the proposal is of course just a suggestion. It could be anything else, or be parameterized if needed.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds-triageNew issues which have not been classified or triaged by a community memberpkg:OpenTelemetry.Exporter.OpenTelemetryProtocolIssues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions