Skip to content
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

Captured stack traces do not benefit from improvements to async stack traces added in .NET Core 2.1 #2234

Closed
ascott18 opened this issue Apr 16, 2021 · 7 comments
Assignees

Comments

@ascott18
Copy link

Is your feature request related to a problem?
Async stack traces captured by App Insights are messy and hard to read. Significant improvements have been made in this area on the .NET side of things, but the .NET AI SDK appears to have extensively custom code for capturing exception stack traces that does not benefit from these .NET improvements.

See:

Describe the solution you'd like.
Stack traces captured by AI have async state machine noise removed as is the case in exception.ToString() in .NET Core 2.1+

@GrantErickson
Copy link

Is there any update on this issue? It would be nice to get better stack traces.

@github-actions
Copy link

github-actions bot commented Jun 3, 2022

This issue is stale because it has been open 300 days with no activity. Remove stale label or this will be closed in 7 days. Commenting will instruct the bot to automatically remove the label.

@github-actions github-actions bot added the stale label Jun 3, 2022
@ascott18
Copy link
Author

ascott18 commented Jun 4, 2022

unstale

@github-actions github-actions bot removed the stale label Jun 5, 2022
@cijothomas cijothomas self-assigned this Sep 16, 2022
@cijothomas
Copy link
Contributor

cijothomas commented Sep 16, 2022

@ascott18 Were you looking to see if ApplicationInsights SDK can simply do ex.ToString() and send the result as stack?

The OpenTelemetry based solution is doing this - i.e ex.ToString() following the OpenTelemetry convention. It is coming up as a preview release early October.

@ascott18
Copy link
Author

@cijothomas I'm looking for all the extra async noise to not be included in the call stack.

Example of a typical app Insights call stack:
image

exception.StackTrace from an exception I just triggered (first picture, the same as what App Insights uses), versus exception.ToString() (second picture) for the same exception which excludes all of that noise:
image
image

See how enormously more readable the second stack trace is? That's what I'd love to be reading through when I'm looking at exceptions in app insights, as opposed to the first one.

@cijothomas
Copy link
Contributor

@ascott18 Thanks for confirming! Yes that will be the case with the OpenTelemetry based solution.
We are not actively making new features/fixes to this repo, so its unlikely to get that fixed here. Would be great if you can use the preview version of OpenTelemetry based solution, and share any feedback!
Thanks!

@github-actions
Copy link

This issue is stale because it has been open 300 days with no activity. Remove stale label or this will be closed in 7 days. Commenting will instruct the bot to automatically remove the label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants