Getting Started

Installation and deployment guide for Serverless OTLP Forwarder.

For OpenTelemetry concepts and terminology, refer to the OpenTelemetry documentation.

Prerequisites

  1. Install required tools:

    macOS

    # Install AWS SAM CLI
    brew install aws-sam-cli
    
    # Install AWS CLI (if not installed)
    brew install awscli
    
    # Install rust and cargo-lambda
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    cargo install cargo-lambda
    
    # Verify installations
    sam --version
    aws --version
    

    Linux

    # Install AWS SAM CLI
    pip install aws-sam-cli
    
    # Install AWS CLI (if not installed)
    curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
    unzip awscliv2.zip
    sudo ./aws/install
    
    # Install rust and cargo-lambda
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    cargo install cargo-lambda
    
    # Verify installations
    sam --version
    aws --version
    

    Windows

    # Install AWS SAM CLI
    choco install aws-sam-cli
    
    # Install AWS CLI (if not installed)
    choco install awscli
    
    # Download and run rustup-init.exe from https://rustup.rs/
    # Install rust and cargo-lambda
    cargo install cargo-lambda
    
    # Verify installations
    sam --version
    aws --version
    
  2. Configure the collector endpoint by creating a secret in AWS Secrets Manager:

    aws secretsmanager create-secret \
      --name "serverless-otlp-forwarder/keys/default" \
      --secret-string '{
        "name": "my-collector",
        "endpoint": "https://collector.example.com",
        "auth": "x-api-key=your-api-key"
      }'
    
  3. Deploy the forwarder and demo stack:

    # Clone repository
    git clone https://github.com/dev7a/serverless-otlp-forwarder
    cd serverless-otlp-forwarder
    
    # Build and validate
    sam build
    sam validate --lint
    
    # Deploy with guided setup
    sam deploy --guided
    

    The --guided flag initiates an interactive deployment process. When prompted:

    • Confirm deployment of the demo stack
    • Accept the creation of a function URL without authentication (can be removed after testing)
  4. Verify the deployment by checking your observability backend for demo stack traces.

Implementation

Choose your programming language and follow the corresponding guide to instrument your application:

Configuration Options

The forwarder supports various configuration options:


Table of contents