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

added stacktrace to Log error strat #191

Merged
merged 3 commits into from
Aug 7, 2020
Merged

Conversation

willarmiros
Copy link
Contributor

Description of changes:
Adds debug-level logging of the stacktrace for context missing exceptions that are suppressed by the Log Error strategy. This could be helpful for both customers and us to debug CME issues, especially in the agent whose default strategy is Log Error.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@@ -32,6 +32,7 @@
@Override
public void contextMissing(String message, Class<? extends RuntimeException> exceptionClass) {
logger.error("Suppressing AWS X-Ray context missing exception (" + exceptionClass.getSimpleName() + "): " + message);
logger.debug(new RuntimeException(message));
Copy link
Contributor

Choose a reason for hiding this comment

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

The exception constructor has a lot of overhead, so we need to call it only when debug is enabled

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, a bit tired :)

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.

None yet

2 participants