[go: nahoru, domu]

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

nslaughter/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/receivers/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 Lambda 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:

Contributing

See the Contributing Guide for details.

Here is a list of community roles with current and previous members:

Learn more about roles in the community 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

Packages

No packages published

Languages

  • Go 59.5%
  • HCL 12.3%
  • Shell 7.5%
  • Python 7.3%
  • Java 5.3%
  • TypeScript 3.2%
  • Other 4.9%