-
Notifications
You must be signed in to change notification settings - Fork 734
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
Exception Logging #5719
Comments
Hi @joaoluizalbuquerque, how are you calling the APIs and how is it shown in stdout? (With any exporter?) Can you provide a minimal reproduce app to showcase your issue? |
If using OTLPExporter and exception was missing - then simply update to the newest stable (1.9.0). Exceptions were not exported by default in OTLP until recently... |
Sorry for the delayed response. Updating to OpenTelemetry.Exporter.OpenTelemetryProtocol to 1.9.0 did the job. Thanks @cijothomas |
What is the question?
Hi, guys.
Recently I've been trying to figure out why some of my API's don't log exceptions. When I call _logger.LogError(ex, "Error message"); it seems like the log is ignored by the SDK, although it's shown in stdout.
I tried taking a look at the open telemetry collector logs and I can see the following three attributes for another API with the same instrumentation: exception.type, exception.message, exception.stacktrace, but they don't appear for the API in question. I also tried using the self diagnose tool but it don't show any Waning/Error logs.
So my question is: Is there any SDK setting for disabling logs with exceptions? Or disabling stack traces? (It also doesn't seem like a log length limit as I have already tried logging a really long string and it worked)
Additional context
I'm using
.Net 7;
"OpenTelemetry.Instrumentation.AspNetCore" Version="1.7.1";
"OpenTelemetry" Version="1.7.0"
The text was updated successfully, but these errors were encountered: