-
Notifications
You must be signed in to change notification settings - Fork 100
feat(crac): Support CRaC and priming of powertools tracing #2345
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
base: main
Are you sure you want to change the base?
Conversation
|
Hey @Attyuttam, do you think you are able to develop inside Windows Subsytem for Linux (https://code.visualstudio.com/docs/remote/wsl) or inside a Docker container (https://code.visualstudio.com/docs/devcontainers/containers) or on a linux remote machine (https://code.visualstudio.com/docs/remote/remote-overview)? As a quick solution, you could also make the changes locally and then build and run the tests inside a Docker container with Java and Maven installed. What do you think? A large amount of changes you made in this PR are related to your OS (Windows) and break our Linux-based CI. Making all tests OS-independent would be task on its own. |
|
sure @phipag , I will test as you suggested. Thanks ! |
|
Hi @phipag , I’ve updated the changes and validated them in a Linux environment using WSL to match the project’s CI setup. |
|
phipag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Attyuttam,
this looks very good. Just a minor comment below and two small points:
- Can you add a unit test that asserts no exception is thrown in before and after checkpoint? Similar to this: https://github.com/aws-powertools/powertools-lambda-java/pull/2081/changes#diff-70c782dbf1e2b25496c60c4098cf6a9eb6985384319fdba0940bc9129add124b
- Let's add a no-op method such as
init()toTracingUtilsjust so that users can referenceTracingUtilswithout being forced to perform a changing operation such as adding an annotation. And after adding this, just make a small update in the documentation referencinginit()instead ofputAnnotation().
public static void init() {
// Placeholder method used to enable SnapStart priming. Users need a direct reference to this class in order for the CRaC hooks to execute.
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the changes in this file are not needed. In your previous PR I added this env var to all modules that need it.

Summary
Changes
Added CRaC support in powertools-tracing, following the guide and blogs mentioned on the ticket.
Added automatic priming for powertools-metrics by preloading all the required classes, the list of classes is fetched from the JVM at compile time.
Issue number: #2004
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.