-
Notifications
You must be signed in to change notification settings - Fork 95
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
OpenTelemetry.AutoInstrumentation fails with console application #3911
Comments
May try to skip the ASP.NET Core instrumentation ... although for sure it's not going to change installed deps. |
yeah, I think the instrumentation is not the issue, but the dependency on |
Yes, just the AspNetCore instrumentation should be lazy loaded. At least on the runtime it should not crash then. SkippedInstrumentations should make it not to load ASP.NET Core as a dependency. |
Maybe two NuGet packages can be greated, something like |
Unfortunately these are not the only issues. It will bring anyway max set of packages and the dependencies (some by the reference and not physically). |
Bug Report
Symptom
Describe the bug
Install the NuGet package into a "regular" (no ASP.NET or so) console application, following instructions at https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/docs/using-the-nuget-packages.md
Expected behavior
Working instrumentation, however I am unable to start my instrumented application:
Note the framework Microsoft.AspNetCore.App while I have a "regular" console application. Instrumentation seems to change this. Therefore it is unable to start the application, as only the regular runtime is installed in
mcr.microsoft.com/dotnet/runtime:9.0
.This is what is installed in the container and is sufficient when running without instrumentation:
Side note: Interestingly, when using the "shell script installer" https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation?tab=readme-ov-file#shell-scripts everything works. However, as installing the NuGet package is the recommended way and I have access to the source code, I prefer to install the NuGet package instead of using the installer.
Screenshots
If applicable, add screenshots to help explain your problem.
Runtime environment (please complete the following information):
Additional context
Add any other context about the problem here.
Reproduce
Steps to reproduce the behavior:
worker
templateThe text was updated successfully, but these errors were encountered: