Skip to content

[otlp] Remove Grpc.Core Deprecated Package Dependency from OTLP Exporter #6209

@rajkumar-rangaraj

Description

@rajkumar-rangaraj

Background

The current implementation of the OTLP Exporter targets net462 and netstandard2.0 and relies on Grpc.Core, which has been officially marked for deprecation. Continued use of this deprecated package significantly increases security risks, including potential vulnerabilities due to lack of active maintenance and ongoing security updates. Eliminating this dependency is crucial to ensure a secure, maintainable, and reliable implementation moving forward.

Impact

  • No Impact to .NET Targets: There is no impact to .NET targets as they currently do not have any direct dependency on Grpc.Core APIs.
  • Impact on .NET Framework Applications: .NET Framework applications will lose the ability to send telemetry data via gRPC when using either HTTP or HTTPS URLs. This limitation exists because the .NET Framework lacks built-in or fully supported APIs capable of handling gRPC communication consistently across both secure (HTTPS) and non-secure (HTTP) protocols. Although some packages offer limited HTTPS support, they do not provide comprehensive support for both protocols.

Workarounds

  • Use WinHttpHandler:
    Customers can continue using gRPC over HTTPS by leveraging the OpenTelemetry.Exporter.OtlpExporterOptions.HttpClientFactory property. Adding a WinHttpHandler as shown below will enable telemetry data to be sent successfully, but only when using an HTTPS endpoint, such as https://localhost:4317/.

    The WinHttpHandler class is available through the NuGet package System.Net.Http.WinHttpHandler.

  exporterOptions.HttpClientFactory = () => new HttpClient(new WinHttpHandler());
  • Stay with an earlier version: Alternatively, customers can continue using a version equal to or lower than OpenTelemetry.Exporter.OpenTelemetryProtocol version 1.11.2 to maintain existing functionality without changes.

SIG Discussion (3/25/2025)

During the SIG meeting on March 25, we discussed this dependency removal, highlighting agreement on prioritizing security by phasing out deprecated dependencies. The consensus was clear about moving forward with this change, acknowledging potential impacts, and providing suitable workarounds.

Runtime Version

net462, netstandard2.0

cc: @open-telemetry/dotnet-maintainers @open-telemetry/dotnet-approvers

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions