open-telemetry / opentelemetry-dotnet-contrib

This repository contains set of components extending functionality of the OpenTelemetry .NET SDK. Instrumentation libraries, exporters, and other components can find their home here.
https://opentelemetry.io
Apache License 2.0
474 stars 283 forks source link

error NU1107: Version conflict detected for Google.LongRunning. Install/reference Google.LongRunning 3.0.0 directly to project to resolve this issue #1423

Open Rishabh-V opened 1 year ago

Rishabh-V commented 1 year ago

Issue with OpenTelemetry.Exporter.Stackdriver 1.0.0-beta.4

The exporter isn't compatible with the latest version of Google Cloud Client libraries that depend on Google.LongRunning. The exporter uses an old version of Google.Cloud.Monitoring.V3. The version range is [2.6.0,4.0) . This pulls old version of Google.LongRunning.

So, any .NET application that references the latest version of Google Cloud .NET libraries that uses Google.LongRunning (Example Spanner) and wants to leverage the exporter, NuGet restore fails with error

error NU1107: Version conflict detected for Google.LongRunning. Install/reference Google.LongRunning 3.0.0 directly to project to resolve this issue.

On installing Google.LongRunning 3.0.0 directly in application, I was able to resolve the error but ran into runtime error - System.MissingMethodException: Method not found: 'Void Google.Api.Gax.Grpc.ClientBuilderBase'1.ctor()'.' in Export method of Exporter.

MethodNotFoundException

List of all OpenTelemetry NuGet packages

Runtime version: net6.0

Is this a feature request or a bug?

What is the expected behavior? I should be able to install and use exporter with latest version of Google Cloud Client libraries installed in my application.

What is the actual behavior? Unable to install the exporter due to the NuGet conflict mentioned above.

It appears to me that the issue can be resolved by targeting .netstandard2.1 and updating the dependencies.

Kielek commented 1 year ago

@SergeyKanzhelev, please check this issue.

dieron commented 10 months ago

I'm getting the same error :-(

dieron commented 10 months ago

Changing it to .netstandard2.1 actually helps