-
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
[BUG] OpenTelemetry-AzureMonitor-Exporter throws when LogLevel of Microsoft.AspNetCore is Information or lower #34259
Comments
Thank you for your feedback. This has been routed to the support team for assistance. |
@davidelettieri - Thanks for reporting this. However, I am not able to repro using your example. I can see the logger.LogInformation("Sample log message"); getting logged successfully. |
@vishweshbankwar thanks for checking the issue. The error shows up only when the LogLevel for Microsoft.AspNetCore is Now the repo is updated with the LogLevel required to trigger the issue. You can change the loglevel back to |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @cijothomas, @reyang, @rajkumar-rangaraj, @TimothyMothra, @vishweshbankwar. Issue DetailsLibrary name and versionAzure.Monitor.OpenTelemetry.Exporter 1.0.0-beta.7 Describe the bugWhen using open telemetry logging with Azure Monitor Exporter if the LogLevel of Microsoft.AspNetCore is For example, when calling an endpoint like this one, the log in not appearing on azure monitor and an exception is logged. app.MapGet("/sample-endpoint", (ILogger<Program> logger) =>
{
logger.LogInformation("Sample log message");
return Results.NoContent();
}); Expected behaviorAzure Monitor Exporter should not give error and all logs should be available in azure monitor Actual behaviorAn exception is thrown and the log is not sent to azure monitor.
Reproduction StepsProject with a minimal setup to experience the error https://github.com/davidelettieri/open-telemetry-sample EnvironmentMicrosoft Visual Studio Enterprise 2022 Version 17.4.4
|
Adding service team to look into this. @cijothomas, @reyang, @rajkumar-rangaraj, @TimothyMothra, @vishweshbankwar |
@davidelettieri - Able to repro this now, Thanks!. Will work on fixing missing logs issue. Note that error you see is due to the way ASP.NET Core is logging (needs separate investigation outside of Azure Monitor Exporter). You might continue to see this error. However, it should not impact other logs as it is doing currently (After the fix). |
@davidelettieri The fix for this will be included in next release. In the meantime you can set options.ParseStateValues = true to workaround this issue. |
Library name and version
Azure.Monitor.OpenTelemetry.Exporter 1.0.0-beta.7
Describe the bug
When using open telemetry logging with Azure Monitor Exporter if the LogLevel of Microsoft.AspNetCore is
Information
or lower, an error is logged in the debug windows and application logs are not sent to azure monitor.For example, when calling an endpoint like this one, the log in not appearing on azure monitor and an exception is logged.
Expected behavior
Azure Monitor Exporter should not give error and all logs should be available in azure monitor
Actual behavior
An exception is thrown and the log is not sent to azure monitor.
Reproduction Steps
Project with a minimal setup to experience the error
https://github.com/davidelettieri/open-telemetry-sample
Environment
Microsoft Visual Studio Enterprise 2022 Version 17.4.4
The text was updated successfully, but these errors were encountered: