-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Disable self-logging and self-tracing in Azure Monitor distro, exporter, and livemetrics #43359
Disable self-logging and self-tracing in Azure Monitor distro, exporter, and livemetrics #43359
Conversation
Hmmm, that doesn't appear to be the case. I validated the open issue against the current main branch. |
...emetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Tests/AzureSdkLoggingTests.cs
Show resolved
Hide resolved
Did you see them in console or in the AppInsights resource? and nothing goes to the backend. Console/other provides logs will appear though. This change also blocks console/other providers from ever seeing exporter/live metrics logs/traces |
Ah, I was only testing the local console as this was the user's first complaint. |
(not for this pr) |
I'm totally open to add it in this or other PR, but users can easily disable all Azure logs by doing "Logging" : {
"LogLevel" : {"Azure" : "None"}
} and extra API flag would just do the same, but introduce some conflicts (e.g. appsetting.json says it's enabled and flag disables it - it'd be harder to debug) |
Thanks. I think we can skip for now and continue to monitor user feedback. For now, I think we should include a mention in the Distro Readme describing where these extra logs are coming from and how to opt-out. I can make an attempt at this. |
sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/AzureMonitorOptions.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Agree! |
sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/AzureMonitorOptions.cs
Outdated
Show resolved
Hide resolved
sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/AzureMonitorOptions.cs
Show resolved
Hide resolved
bd537c2
to
4cc2cd1
Compare
Fixes #43286
In fact it's already fixed with #41858, this change prevents traces/logs creation from happening from LiveMetrics, Exporter or Distro, i.e. serves as a small optimization.
It changes the default - disables diagnostics, but in theory users can still enable if it's ever necessary to diagnose AzMon issues.