Below we shall see the steps for AWS Python Serverless Auto-Instrumentation Monitoring in Atatus using OTel Lambda Layer.
  1. To incorporate the OpenTelemetry Lambda layer into your Python 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. 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 (see step 3).
  3. 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 root directory.
      b. Configure the lambda function by setting the environment variables in the corresponding Serverless Environment.
4. Deploy this file along with your Lambda function.