Setting up Thundra Java Library manually
Thundra Java Library
Add Thundra repo (
repo.thundra.io
) to your repositories:<repositories>
<repository>
<id>thundra-releases</id>
<name>Thundra Releases</name>
<url>https://repo.thundra.io/content/repositories/thundra-releases</url>
</repository>
</repositories>
Add Thundra dependency:
<dependency>
<groupId>io.thundra.agent</groupId>
<artifactId>thundra-agent-lambda-all</artifactId>
<type>pom</type>
<version>${thundra.version}</version>
</dependency>
You can use the version shown below instead of
${thundra.version}
.Bundle all your Java module files along with additional 3rd party dependencies and Thundra library, and then upload it.
While you are building your artifact along with Thundra library, be sure that Thundra service files (under
META-INF/services
) are merged properly.For example if you are using Maven Shade plugin, be sure that you have
ServicesResourceTransformer
transformer configured:pom.xml
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven.shade.plugin.version}</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
</transformers>
</configuration>
Add the Thundra API key through
THUNDRA_APIKEY
environment variableSet the handler to
io.thundra.agent.lambda.core.handler.ThundraLambdaHandler
and set the THUNDRA_AGENT_LAMBDA_HANDLER
environment variable value to your original handler.