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

Microsoft.ApplicationInsights.AspNetCore dependency on System.Diagnostics.DiagnosticSource is causing logs & telemetry to be missing #2955

Open
dejanstamenov opened this issue Feb 4, 2025 · 0 comments

Comments

@dejanstamenov
Copy link

Hi!

I've been missing logs & all telemetry on an Azure environment within Azure Application Insights since late Dec 2024. I've very recently uncovered this and have been digging into the reasons why suddenly there's no telemetry for the environment. It's a .NET 6 API, hosted on Linux Web App under Azure, connected to Application Insights.

I was about to raise a support request within Azure for this problem, when I was given the following recommendation within Azure while attempting to raise the support ticket (in the form of known issues; see highlighted under 3):

Image

Referenced documentation here.

Interestingly enough, it says that any of those dynamic-link libraries (DLLs) that might be present in the bin directory may cause the monitoring to fail (which is pretty vague description itself). Which they did (suddenly), since my Application Insights setup is no different than what is explained here in the docs and it's been working fine for couple of years now.

However, troubleshooting through the problem I've applied the recommendation and turned on the Interop with Application Insights SDK (which is off by default):

Image

and that finally made telemetry push through Application Insights!

What is really confusing here is that Azure knowledge base points out that the presence of System.Diagnostics.DiagnosticSource.dll and Microsoft.ApplicationInsights.dll may cause telemetry to be missing, while System.Diagnostics.DiagnosticSource is actually a transitive package within Microsoft.ApplicationInsights? The API's logging & telemetry setup with Azure Application Insights has been in place for couple of years now and wasn't changed at all, but telemetry stopped working suddenly?

Image

Furthermore, the Application Insights implementation documentation doesn't really mention any of these potential problems that may occur?

If this issue is raised in the wrong project, please direct me to the right project and I'll re-create it there.

Thanks for the time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant