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

[bug] Enabling SuppressDownstreamInstrumentation can sometimes in certain conditions disable ILogger #6121

Open
michaeldimoudis opened this issue Feb 4, 2025 · 0 comments
Labels
bug Something isn't working needs-triage New issues which have not been classified or triaged by a community member pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package

Comments

@michaeldimoudis
Copy link

Package

OpenTelemetry

Package Version

Package Name Version
OpenTelemetry.Api 1.9.0
OpenTelemetry 1.9.0
OpenTelemetry.Instrumentation.AWS 1.1.0-beta.6

Runtime Version

net48

Description

Hi, I just want to record a very weird bug that only happens in certain conditions.

We have some very old .NET Framework background services. The DI used is Ninject.

We have added OpenTelemetry, with Microsoft.Extensions.Logging, and hooked it all up so we can use LoggerFactory.Create() with OpenTelemetry and inject ILogger<ClassName>.

This all works on basically all of our legacy .NET Framework ASP.NET and various background services.

However we have 1 particular background service with a very weird issue. We do add the AddAWSInstrumentation() to Tracing, and whenever we set SuppressDownstreamInstrumentation = true, after the first 1 or 2 logs or written to, ILogger gets disabled (as per screenshot).

Image

For this 1 background service, this is consistanly the case, however we have never experienced this in our .NET Framework ASP.NET web applications or some other background services, even though they are all bootstrapped the same and using the same code.

I tried to look into the OpenTelemetry source code, but could not find any correlation.

Steps to Reproduce

Setting SuppressDownstreamInstrumentation = true, after a while ILogger<ClassName> gets disabled. Not setting that property to true, ILogger<ClassName> never gets disabled.

Expected Result

For ILogger<ClassName> to not get disabled when SuppressDownstreamInstrumentation = true.

Actual Result

ILogger<ClassName> gets disabled when SuppressDownstreamInstrumentation = true and after the first log is written.

Additional Context

Old legacy .NET Framework code using Ninject, and only happens on 1 particular service even though we have other services bootstrapped the exact same way...

All I am expecting in this bug report is if a) someone else stumbles into this problem, and b) if a maintainer closer to the code has a light bulb moment that might know how and why this can occur.

@michaeldimoudis michaeldimoudis added bug Something isn't working needs-triage New issues which have not been classified or triaged by a community member labels Feb 4, 2025
@github-actions github-actions bot added the pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage New issues which have not been classified or triaged by a community member pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package
Projects
None yet
Development

No branches or pull requests

1 participant