Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OTLP Exporter: Consider internalizing Google.Protobuf #4395

Closed
alanwest opened this issue Apr 17, 2023 · 1 comment
Closed

OTLP Exporter: Consider internalizing Google.Protobuf #4395

alanwest opened this issue Apr 17, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package

Comments

@alanwest
Copy link
Member

#4201 upgraded the OTLP exporter's dependency on Google.Protobuf from 3.19.4 to 3.22.0.

This causes issues for the opentelemetry-dotnet-instrumentation project (see: open-telemetry/opentelemetry-dotnet-instrumentation#2220). Currently, their project is tightly coupled to the SDK project and any changes in transitive dependencies can cause them issues.

They have requested that we either:

  1. Downgrade back to 3.19.4
  2. Internalize Google.Protobuf

Downgrading is not desirable as consumers of the OTLP exporter would see degraded performance unless they were to explicitly reference Google.Protobuf 3.22 or greater. Therefore, this issue is for discussing the possibility of internalizing Google.Protobuf.

Ultimately, this should be an issue for the opentelemetry-dotnet-instrumentation project to solve. It is too prohibitive for the SDK project to not be able to upgrade its transitive dependencies or add new ones as necessary. However, it may be reasonable to address the problem only for Google.Protobuf because:

  1. Google.Protobuf is only used by the internal code generated from the OTLP protos.
  2. In the longer term, we want to try eliminating our dependency on Google.Protobuf altogether, and implement our own protobuf serialization. The opentelemetry-java project has done this.

As such, an intermediate step towards eliminating Google.Protobuf could be to first internalize it. This would be solely for offering an immediate solution unblocking the opentelemetry-dotnet-instrumentation project.

There are two potential methods for internalizing Google.Protobuf.

  1. Forklift Google.Protobuf code into the OTLP exporter project.
  2. Use a tool like ILRepack.

Forklifting Google.Protobuf may be the more desirable option. It would probably enable us to more easily analyze it for compatibility for things like AOT, trimming, and single-file deploys. However, it is a lot of code (~50k lines). It is possible to identify and remove unused code, but this could be very time consuming and more difficult to maintain.

@alanwest alanwest added the enhancement New feature or request label Apr 17, 2023
@alanwest alanwest added this to the 1.5.0 milestone Apr 18, 2023
@alanwest alanwest modified the milestones: 1.5.0, 1.6.0 Apr 25, 2023
@alanwest alanwest modified the milestones: 1.6.0, 1.7.0 Jun 6, 2023
@utpilla utpilla modified the milestones: 1.7.0, 1.8.0 Oct 17, 2023
@vishweshbankwar vishweshbankwar modified the milestones: 1.8.0, 1.9.0 Mar 12, 2024
@CodeBlanch CodeBlanch added the pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package label Mar 13, 2024
@CodeBlanch CodeBlanch removed this from the 1.9.0 milestone Mar 14, 2024
@rajkumar-rangaraj
Copy link
Contributor

Fixed with 1.11.0-rc.1 version of OpenTelemetry.Exporter.OpenTelemetryProtocol package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package
Projects
None yet
Development

No branches or pull requests

5 participants