Below we shall see the steps for AWS Java Serverless Auto-Instrumentation Monitoring in Atatus using OTel Lambda Layer.
  1. To incorporate the OpenTelemetry Lambda layer into your Java functions, include the following layers in your functions.
    region - set your region
    version - use version from latest Otel OTel Lambda release
    amd64|arm64 - choose architecture
  2. Setup collector using the below steps
    • Establish an environment variable named OPENTELEMETRY_COLLECTOR_CONFIG_FILE=/var/task/atatus-collector.yaml within your Lambda function. This action instructs the extension on the location of the collector configuration.
    • You can optionally set the tags (env, service, and version - Optional) in the processors resource attributes. This helps with organizing all functions within a unified service, making filtering easier.
    • Please create a configuration file named as atatus-collector.yaml below: a. Place atatus-collector.yaml in the src/main/resources directory.
      b. Configure the lambda function by setting the environment variables in the corresponding Serverless Environment.
3. In Atatus Dashboard navigate to Settings tab, then click on Account Settings. From there, go to API Keys. You can either generate a new API key or copy an existing one. After obtaining the API key, you’ll need to set it in the atatus-collector.yaml file under the exporter otlphttp header. 4. Add resource configuration in pom.xml file
5. Build your java application and then deploy your Lambda function.