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
Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' #3272
Comments
I think the issue was a bit different between 1.2.0 and 1.3.0. in 1.3.0, .NET auto-instrumentation stopped shipping exception in 1.3.0
|
Addresses directly: Addresses indirectly: |
@3keyroman Are these self-contained apps? A self-contained app has limitations, and your current workaround seems to be the best solution. Alternatively, you could use the If it's not a self-contained app and you have set additional dependencies and runtime store environment variables, it should automatically upgrade Also, were there direct package references or transient package references to |
@rajkumar-rangaraj Hi there, I was working on resolving this issue with @3keyroman. Application is not self-contained and running in Docker on standard image
Originally, before workaround, I am attaching deps.json for reference. |
The OpenTelemetry .NET SDK has a reference to the 8.0.0 |
Running the ASP NET 6 application in container and autoinstrumenting using
ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet:1.2.0
, managed by OpenTelemetry Operator version0.93.0
resulting in:Trying different versions of
ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet
, every time with the similar result, that theSystem.Diagnostics.DiagnosticSource
cannot be loaded.I am able to make it work only by adding the following dependency to project:
Is it expected behaviour? Should be the
System.Diagnostics.DiagnosticSource
always added to project to make it work? I was not able to find information about that in documentation.I think that the autoinstrumentation should be able to make it work without requiring any dependencies to be added to the application. In many cases, we do not have the application code and dependencies under control and we cannot add it there.
The text was updated successfully, but these errors were encountered: