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

Only capture first line of stacktrace for unexpected RequestAttempt exceptions #1736

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

gavinbunney
Copy link
Contributor

No description provided.

@gavinbunney gavinbunney force-pushed the gavin/request-attempt-stack branch from 0156d53 to b5e5119 Compare January 30, 2024 16:31
@@ -340,7 +339,13 @@ public void setException(Throwable t) {
} else {
error = t.getMessage();
exceptionType = t.getClass().getSimpleName();
cause = Throwables.getStackTraceAsString(t);

// for unexpected exceptions, just capture the first line of the stacktrace
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're suppressing the trace, doesn't cause.getCause() != null ? cause.getCause().toString() : cause.toString()) give you the hint?
When we do suppress, consider making it conditional instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite - these are more "rare case" exceptions (like the test does for a h2stream exception), which don't have a cause attached as it's thrown from within netty handlers, and thus bubbled up from the Promises in ProxyEndpoint, so need to get more info from the stacktrace itself.

@gavinbunney gavinbunney merged commit 569415a into master Jan 30, 2024
5 checks passed
@gavinbunney gavinbunney deleted the gavin/request-attempt-stack branch January 30, 2024 17:40
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.

3 participants