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

Limit overhead of capturing stacktrace in REST Client #42544

Closed
wants to merge 1 commit into from

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Aug 14, 2024

This is done by utilizing the StackWalker API
and limiting the number of frames captured

@geoand
Copy link
Contributor Author

geoand commented Aug 14, 2024

@johnaohara any chance you could test if this improves things?

I didn't have time to profile (I'm on PTO :))

Copy link

quarkus-bot bot commented Aug 14, 2024

/cc @brunobat (opentelemetry), @radcortez (opentelemetry)

@gsmet
Copy link
Member

gsmet commented Aug 14, 2024

But we always capture the stack? Not only on errors?

@geoand
Copy link
Contributor Author

geoand commented Aug 15, 2024

That's the only way to produce a meaningful stacktrace when an error occurs

String className = stackFrame.getClassName();
return className.startsWith(RESTEASY_REACTIVE_PACKAGE) || className.contains(AUTOGENERATED_TAG);
}
}).limit(5).map(StackWalker.StackFrame::toStackTraceElement).toList();
Copy link
Contributor

Choose a reason for hiding this comment

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

Is 5 lines enough?
this probably needs to be documented or add a config to keep the switch to the old behaviour.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's fine for identifying which REST Client is causing the problem and where it was called from.

It's not a complete stacktrace, but the complete one is mostly useless except for the top frames

This is done by utilizing the StackWalker API
and limiting the number of frames captured

Closes: quarkusio#42508
@geoand
Copy link
Contributor Author

geoand commented Sep 30, 2024

Let's close this

@geoand geoand closed this Sep 30, 2024
@quarkus-bot quarkus-bot bot added the triage/invalid This doesn't seem right label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explore the use of StackWalker in REST Client
3 participants