-
Notifications
You must be signed in to change notification settings - Fork 199
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
Not all exceptions are populated with exception type and message #3739
Comments
@ivan-zaitsev did you see exception.type and exception.message in the Application Insights logs blade remoteDependencies table? |
Hello @heyams Correct it doesn't represent the actual custom dimensions to application insights and I didn't see fields I have custom extension which processes span events and it relies on Currently because of this inconsistent behavior I need to cover two cases because Azure Blob Storage client library sometimes throws exactly identical exception to main thread for example for find operations and sometimes it catches exception for example for exist operations. |
@ivan-zaitsev I will use your code to reproduce it or if you can push a repro app to https://github.com/microsoft/ApplicationInsights-Java-Repros will help too. |
@heyams In case of code above |
hi @ivan-zaitsev, from your log we can see
If you look at check out https://github.com/open-telemetry/opentelemetry-java/blob/6fc1d216ca0f199670a1cc5b081ad764d4a043fb/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/internal/data/ImmutableExceptionEventData.java#L62-L85 and you'll see that the |
@ivan-zaitsev we found a difference in our exporter code paths for log-based exceptions and span event-based exceptions, we're exploring the impact of fixing that, we're not sure but it may be related to the issue you're seeing |
Hello @trask I have added repro code to this repo. You can try. https://github.com/microsoft/ApplicationInsights-Java-Repros/pull/12/files |
@trask More likely this issue is connected to that difference. Because SdkLogRecordData contains exception.type, exception.message, and SpanData contains only exception. |
thanks for the repro! we are intentionally not exporting the "internal" exception that is happening under the hood when calling this serves two purposes:
In particular, if you are interested, this is where it's being suppressed during export: if you can describe what you are trying to accomplish a bit more, maybe we can help with a workaround or config option, thanks |
@trask I just wanted to filter out the traces produced by I have custom extension which allows to processes span events, because this agent by default doesn't do that. Because of this inconsistent behavior I need to cover two cases with |
Expected behavior
Span should contain exception type and message. More details: #3148
Actual behavior
Exception type and message is not added in case exception is not propagated to main thread. Span will contain only
exception
field.In other cases span contains
exception.type
andexcpetion.message
, withoutexception
field.Looks like inconsistent behavior which produces completely different fields.
To Reproduce
Code:
Exception is not thrown to main thread, but rather caught inside
blobContainerClient.exists()
.Produced span:
The text was updated successfully, but these errors were encountered: