Skip to content

Fix handling deep stack traces - #507

Closed
Dhaval Doshi (dhaval24) wants to merge 3 commits into
masterfrom
FixHandlingDeepStackTraces
Closed

Dhaval Doshi (dhaval24) wants to merge 3 commits into
masterfrom
FixHandlingDeepStackTraces

Conversation

@dhaval24

Copy link
Copy Markdown
Contributor

Fix #482

This pull request handles the deep stack traces, by trimming it down to Maximum of 10 nested exception depth and max size of parsed stack to be equal to 32768.

In an event of number of nested exceptions exceeding the maximum allowed the first 10 exceptions are considered and a custom exception with a message indicating that maximum depth has exceeded is added as a parent exception.

@dhaval24

Copy link
Copy Markdown
Contributor Author

Gustavo Lima (@grlima) Arthur Little (@littleaj) could you please have a look to the changes here and comment? This is a critical change that needs to be merged as soon as we can.

@dhaval24

Copy link
Copy Markdown
Contributor Author

Gustavo Lima (@grlima) Arthur Little (@littleaj) the PR doesn't fix the issue quite so. Please see the referenced issue where the user has tested this out and somehow the issue still remains and is definitely a size related problem. We need to dig deeper. Please do not merge this yet.

@dhaval24

Copy link
Copy Markdown
Contributor Author

Sergey Kanzhelev (@SergeyKanzhelev) could you please provide your opinion on this? I did some math on this and found that the maximum size of ExceptionTelemetry would be 800000 chars. Is this amount of size acceptable on the backend?

@SergeyKanzhelev

Copy link
Copy Markdown
Contributor

Dhaval Doshi (@dhaval24) opinion on which part of PR?

@dhaval24

Copy link
Copy Markdown
Contributor Author

Sergey Kanzhelev (@SergeyKanzhelev) it is mostly about how much big size of payload can backend retain. Thanks!

@dhaval24

Copy link
Copy Markdown
Contributor Author

Sergey Kanzhelev (@SergeyKanzhelev) we did an experiment on this and the reason is - Our Ingestion endpoint can only accept a payload as big as 2^16 characters. Now since there is no defined rule on trimming out the exceptions. A single exception can be as large as this or nested exceptions can make payload larger than this. Our logic to trim and keep 10 exception is also not sufficient. Further as per the schema each parsed stack can have 32k size and this would make an exception chain of 10 as large as 800000 chars. Our bond schema needs to have some better restriction policy on this. This can also be a potential issue with .NET SDK. Has any one tried it? Do you know a potential work around for the time being for this issue?

@SergeyKanzhelev

Copy link
Copy Markdown
Contributor

Dhaval Doshi (@dhaval24) please post suggestion on required new limits. Thanks for keep digging into it.

@dhaval24

Copy link
Copy Markdown
Contributor Author

Sergey Kanzhelev (@SergeyKanzhelev) what is a good place to post this suggestion ?

@SergeyKanzhelev

Copy link
Copy Markdown
Contributor

@dhaval24

Copy link
Copy Markdown
Contributor Author

@dhaval24

Copy link
Copy Markdown
Contributor Author

Reaching out to community, if anyone has an idea of how long typical java exceptions are, what is the best strategy to trim exceptions and still preserve it's value, please share your knowledge

@littleaj Arthur Little (littleaj) modified the milestones: 2.0.1, future Mar 2, 2018
@grlima

Copy link
Copy Markdown
Contributor

After carefully investigating the issue, we have concluded it would require changes to the backend services to support this change. We will revisit this at a later time if appropriate.

@trask
Trask Stalnaker (trask) deleted the FixHandlingDeepStackTraces branch September 21, 2020 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants