feat: Support CRaC and priming of powertools large messages#2533
feat: Support CRaC and priming of powertools large messages#2533David-DAM wants to merge 6 commits into
Conversation
|
closes #2000 |
…tools_large_messages
|
Hello @phipag, can you review my PR when you have time? Thanks! |
|
Hey @David-DAM, thank you this looks good on first sight. I will have time to test this very soon and will get back to you here. In the meantime, did you test it in your own AWS account? E.g. add debug logs to the CRaC hooks and check if they are executed? |
|
Thanks! Also I don't know how to test it on my own AWS account, is there a guide? |
…sages # Conflicts: # examples/powertools-examples-kafka/src/main/java/org/demo/kafka/protobuf/ProtobufProduct.java # examples/powertools-examples-kafka/src/main/java/org/demo/kafka/protobuf/ProtobufProductOrBuilder.java # examples/powertools-examples-kafka/src/main/java/org/demo/kafka/protobuf/ProtobufProductOuterClass.java # powertools-large-messages/src/main/java/software/amazon/lambda/powertools/largemessages/LargeMessageConfig.java
|
Hey @David-DAM, apologies for the delay. I am testing now and get back to you in a bit here. The approach is quite manual at the moment:
|
|
Hey @David-DAM, thanks for this. I tested it end to end with SnapStart in my own account and hit one blocker. The CRaC registration runs in a static initializer, which only fires when the class first loads. In a normal handler the first reference to Please follow the same pattern as our Tracing module: expose a placeholder public MyHandler() {
LargeMessages.init();
}For the docs, add a "SnapStart priming" section to |
|
By the way: while testing this I found that class preloading was loading 0 classes because |
…sing init method Add documentation for SnapStar in docs/utilities/large_messages.md
|
|
@phipag Thanks for the clarification, i have added the changes related to that |



Issue number: Closes #2000
Description of changes:
Checklist
Breaking change checklist
RFC issue #:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.