Skip to content

Forwards OTLP records serialized to cloudwatch logs to an Open Telemetry collector

License

Notifications You must be signed in to change notification settings

dev7a/serverless-otlp-forwarder

Repository files navigation

Serverless OTLP Forwarder

License: MIT OpenTelemetry AWS Lambda Rust Python Node.js Stability: Experimental

diagram

The Serverless OTLP Forwarder enables serverless applications to send OpenTelemetry data to collectors without the overhead of direct connections or sidecars.

Key Features

  • 🚀 Minimal Performance Impact: Optimized for Lambda execution and cold start times
  • 🔒 Secure by Design: Uses CloudWatch Logs for data transport, no direct collector exposure
  • 💰 Cost Optimization: Supports compression and efficient protocols
  • 🔄 Language Support: Native implementations for Rust, Python, and Node.js
  • 📊 AWS Application Signals: Experimental integration support

Documentation

Visit the documentation site for:

Quick Start

  1. Install prerequisites:

    # Install AWS SAM CLI
    brew install aws-sam-cli  # or your preferred package manager
    
    # Install rust and cargo lambda
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    cargo install cargo-lambda
  2. Configure a collector:

    # Create a configuration 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:

    # Clone the repository
    git clone https://github.com/dev7a/serverless-otlp-forwarder && cd serverless-otlp-forwarder
    # Deploy
    sam build --parallel && sam deploy --guided
  4. Instrument your application using our language-specific libraries:

Background

This project addresses specific challenges in serverless observability, particularly the performance impact of traditional OpenTelemetry collection methods. The standard approach using OTEL/ADOT Lambda Layer extensions introduces significant overhead through sidecar agents, affecting both cold start times and runtime performance.

This becomes especially relevant in scenarios requiring memory-optimized Lambda functions, where the resource overhead of traditional collectors can offset the benefits of memory optimization. The forwarder approach provides an alternative that maintains telemetry capabilities while minimizing resource utilization.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Forwards OTLP records serialized to cloudwatch logs to an Open Telemetry collector

Resources

License

Stars

Watchers

Forks

Packages

No packages published