Skip to content

Create your own Lambda Layer in each OTel language using this starter code. Add the Lambda Layer to your Lamdba Function to get tracing with OpenTelemetry.

License

Notifications You must be signed in to change notification settings

coralogix/opentelemetry-lambda

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenTelemetry Lambda

GitHub Java Workflow Status GitHub Collector Workflow Status GitHub NodeJS Workflow Status GitHub Terraform Lint Workflow Status GitHub Python Pull Request Workflow Status

OpenTelemetry Lambda Layers

The OpenTelemetry Lambda Layers provide the OpenTelemetry (OTel) code to export telemetry asynchronously from AWS Lambdas. It does this by embedding a stripped-down version of OpenTelemetry Collector Contrib inside an AWS Lambda Extension Layer.

Some layers include the corresponding OTel language SDK for the Lambda. This allows Lambdas to use OpenTelemetry to send traces and metrics to any configured backend.

Extension Layer Language Support

FAQ

  • What exporters/recievers/processors are included from the OpenTelemetry Collector?

    You can check out the stripped-down collector's imports in this repository for a full list of currently included components.

  • Is the Lambda layer provided or do I need to build it and distribute it myself?

    This repository does not provide pre-build Lambda layers. They must be built manually and saved in your AWS account. This repo has files to facilitate doing that. More information is provided in the Collector folder's README.

Design Proposal

To get a better understanding of the proposed design for the OpenTelemetry Lamda extension, you can see the Design Proposal here.

Features

The following is a list of features provided by the OpenTelemetry layers.

OpenTelemetry collector

The layer includes the OpenTelemetry Collector as a Lambda extension.

Custom context propagation carrier extraction

Context can be propagated through various mechanisms (e.g. http headers (APIGW), message attributes (SQS), ...). In some cases, it may be required to pass a custom context propagation extractor in lambda through configuration, this feature allows this through Lambda instrumentation configuration.

X-Ray Env Var Span Link

This links a context extracted from the Lambda runtime environment to the instrumentation-generated span rather than disabling that context extraction entirely.

Semantic conventions

The Lambda language implementation follows the semantic conventions specified in the OpenTelemetry Specification.

Auto instrumentation

The Lambda layer includes support for automatically instrumentation code via the use of instrumentation libraries.

Flush TracerProvider

The Lambda instrumentation will flush the TracerProvider at the end of an invocation.

Flush MeterProvider

The Lambda instrumentation will flush the MeterProvider at the end of an invocation.

Support matrix

The table below captures the state of various features and their levels of support different runtimes.

Feature Node Python Java .NET Go Ruby
OpenTelemetry collector + + + + +
Custom context propagation + - - - N/A
X-Ray Env Var Span Link - - - - N/A
Semantic Conventions^ + + + N/A
- Trace General^1 + + + N/A
- Trace Incoming^2 - - + N/A
- Trace Outgoing^3 + - + N/A
- Metrics^4 - - - N/A
Auto instrumentation + + - N/A
Flush TracerProvider + + + +
Flush MeterProvider + +

Legend

  • + is supported
  • - not supported
  • ^ subject to change depending on spec updates
  • N/A not applicable to the particular language
  • blank cell means the status of the feature is not known.

The following are runtimes which are no longer or not yet supported by this repository:

About

Create your own Lambda Layer in each OTel language using this starter code. Add the Lambda Layer to your Lamdba Function to get tracing with OpenTelemetry.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 48.3%
  • HCL 22.4%
  • Python 7.3%
  • Shell 5.9%
  • Java 5.3%
  • Kotlin 3.4%
  • Other 7.4%