powertools-lambda-java
powertools-lambda-java copied to clipboard
RFC: Support for lambda extensions
Is your feature request related to a problem? Please describe. I' currently using lambda extensions for starting an external process and tried to implement powertools' logging and metrics modules into it, however they did not work.
Describe the solution you'd like Powertools recognizing that it is inside lambda environment to emit metrics and format logs.
Describe alternatives you've considered Using cloudwatch sdk and log4j direct implementation, however it involves a lot of plumbing that is not easy to handle.
Additional context Im using java 8 corretto runtime.
Hey, @RobertoC27 Thanks for opening the RFC. We will have to give it some thoughts on what would be the best way to support this but indeed it would be good to have this working inside extensions as well.
Currently when using this AWS tool within quarkus (2.0.2 with graalv 21.1) you get the following exception:
see why software.amazon.awssdk.core.retry.backoff.FullJitterBackoffStrategy got initialized use --trace-class-initialization=software.amazon.awssdk.core.retry.backoff.FullJitterBackoffStrategy
Which is caused by the fact that initialize the default SqsClient even if you override it later. Could you please do lazy loading of the SqsClient. That way we can fix this problem very easily.
public final class SqsUtils { ///// private static SqsClient client = SqsClient.create();
Currently when using this AWS tool within quarkus (2.0.2 with graalv 21.1) you get the following exception:
see why software.amazon.awssdk.core.retry.backoff.FullJitterBackoffStrategy got initialized use --trace-class-initialization=software.amazon.awssdk.core.retry.backoff.FullJitterBackoffStrategy
Which is caused by the fact that initialize the default SqsClient even if you override it later. Could you please do lazy loading of the SqsClient. That way we can fix this problem very easily.
public final class SqsUtils { ///// private static SqsClient client = SqsClient.create();
Please create a new issue, this isn't associated to the original.