Closed joaoluizalbuquerque closed 4 months ago
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... https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/CHANGELOG.md#180-beta1
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"