Skip to content

Truncate exception telemetry's parsedStack when there is a deep stack trace exceeding 65536 bytes - #1702

Merged
Helen (heyams) merged 6 commits into
masterfrom
heya/log-exception
May 25, 2021
Merged

Helen (heyams) merged 6 commits into
masterfrom
heya/log-exception

Conversation

@heyams

@heyams Helen (heyams) commented May 21, 2021 •

Copy link
Copy Markdown
Contributor

applicationinsights-agent-3.1.1-BETA-SNAPSHOT.zip

2021-05-20 17:44:13.245-07 DEBUG c.m.applicationinsights.agent - ############# current stack depth: 8943
2021-05-20 17:44:13.266-07 DEBUG c.m.a.telemetry.ExceptionTelemetry - parsedStack is exceeding 65536 bytes capacity. It is truncated from full 1024 frames to partial 308 frames.
Trask Stalnaker (@trask) method call depth (8943) does not equal to the number of stack frames (total 1024). What i showed you earlier in Fiddler is the full stack.

When we add stack frame to ExceptionTelemetry, it's already in the reversed order.

Fix #482

@trask

Copy link
Copy Markdown
Member

can you test with an exception that is captured by auto-instrumentation? I think that will go through a different code path and not get fixed by this change

@heyams

Copy link
Copy Markdown
Contributor Author

Breeze accepts exceptions captured by auto-instrumentation that exceed 65536 bytes. I've sent an email to Oleg to confirm if that's a bug.. because of it's insistent. here clearly indicates that both parsedStack and stack should have the same constraint.. but based on my testing, "stack" doesn't have this constraint. that's why it doesn't have any impact on auto-instrumentation yet.

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
@heyams

Copy link
Copy Markdown
Contributor Author

Trask Stalnaker (@trask) test:smoke:testApps:WebFlux kept failing.. i reran the job once.. i will let you take a look.. this is keep coming back.

@heyams
Helen (heyams) merged commit 7a000d3 into master May 25, 2021
@trask
Trask Stalnaker (trask) deleted the heya/log-exception branch May 25, 2021 22:04
Trask Stalnaker (trask) added a commit that referenced this pull request Jun 22, 2021
… trace exceeding 65536 bytes (#1702)

* Repro deep stack trace

* Truncate parsedStack not to exceed 65536 bytes capacity

* Remove test code

* cleanup unused imports

* Fix javadoc

* add note

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ExceptionTelemetry with large / deep stack traces are silently omitted

2 participants