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

Google.Protobuf 3.15.0 breaks the Otlp Exporter #1854

Closed
EraYaN opened this issue Feb 26, 2021 · 2 comments · Fixed by #1873
Closed

Google.Protobuf 3.15.0 breaks the Otlp Exporter #1854

EraYaN opened this issue Feb 26, 2021 · 2 comments · Fixed by #1873
Labels
area:exporter:otlp OpenTelemetry Protocol (OTLP) Exporter bug Something isn't working help wanted Good for taking. Extra help will be provided by maintainers

Comments

@EraYaN
Copy link

EraYaN commented Feb 26, 2021

Bug Report

A bug report is not really the right way to report this one, this is more a heads up I guess if this ever manifests when updating the dependencies.

List of NuGet packages and
version that you are using (e.g. OpenTelemetry 0.4.0-beta.2):

  • <PackageReference Include="OpenTelemetry" Version="1.0.1" />
  • <PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.0.1" />
  • <PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.0.1" />

Runtime version:

  • net5.0

Symptom

A clear and concise description of what the bug is.

Upgrading Google.Protobuf 3.14.0 -> 3.15.0 breaks the Otlp (Batch?) Exporter.

What is the expected behavior?

No exception. (So it finds the ByteString constructor)

What is the actual behavior?

The application crashes with this exception.

Unhandled exception. System.TypeInitializationException: The type initializer for 'OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation.ActivityExtensions' threw an exception.
 ---> System.ArgumentNullException: Value cannot be null. (Parameter 'con')
 at System.Reflection.Emit.DynamicILGenerator.Emit(OpCode opcode, ConstructorInfo con)
 at OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation.ActivityExtensions.CreateByteStringCtorFunc()
 at OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation.ActivityExtensions..cctor()
 --- End of inner exception stack trace ---
 at OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation.ActivityExtensions.AddBatch(ExportTraceServiceRequest request, Resource processResource, Batch`1& activityBatch)
 at OpenTelemetry.Exporter.OtlpTraceExporter.Export(Batch`1& activityBatch)
 at OpenTelemetry.BatchExportProcessor`1.ExporterProc()
 at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
 at System.Threading.ThreadHelper.ThreadStart()

Reproduce

Update your application to Google.Protobuf 3.15.0 (local to the project)

Additional Context

The new Google.Protobuf 3.15.0 package changed the ByteString type thus breaking compat with this package it seems.
https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/ActivityExtensions.cs#L346 (here)

protocolbuffers/protobuf#7645

According to that PR's discussion, it seems they have now added a public API to replace the private API this project is using.

@EraYaN EraYaN added the bug Something isn't working label Feb 26, 2021
@reyang reyang added area:exporter:otlp OpenTelemetry Protocol (OTLP) Exporter help wanted Good for taking. Extra help will be provided by maintainers labels Feb 26, 2021
@pereiren
Copy link

Hi guys, I faced this issue today.

Is there any ETA for the release including this fix?

Thank you and best regards from Spain!

@cijothomas
Copy link
Member

It'll be part of 1.1.0-beta2 release and being released today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:exporter:otlp OpenTelemetry Protocol (OTLP) Exporter bug Something isn't working help wanted Good for taking. Extra help will be provided by maintainers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants