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.
- 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 provides pre-built Lambda layers, their ARNs are available in the Releases. You can also build the layers manually and publish them in your AWS account. This repo has files to facilitate doing that. More information is provided in the Collector folder's README.
To get a better understanding of the proposed design for the OpenTelemetry Lambda extension, you can see the Design Proposal here.
The following is a list of features provided by the OpenTelemetry layers.
The layer includes the OpenTelemetry Collector as a Lambda extension.
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.
This links a context extracted from the Lambda runtime environment to the instrumentation-generated span rather than disabling that context extraction entirely.
The Lambda language implementation follows the semantic conventions specified in the OpenTelemetry Specification.
The Lambda layer includes support for automatically instrumentation code via the use of instrumentation libraries.
The Lambda instrumentation will flush the TracerProvider
at the end of an invocation.
The Lambda instrumentation will flush the MeterProvider
at the end of an invocation.
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 | + | + | - |
+
is supported-
not supported^
subject to change depending on spec updatesN/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:
- Node.js 12 - not officially supported by OpenTelemetry JS
See the Contributing Guide for details.
Here is a list of community roles with current and previous members:
-
Approvers (@open-telemetry/lambda-extension-approvers):
- Tristan Sloughter, Splunk
-
Emeritus Approvers:
- Lei Wang, AWS
- Nathaniel Ruiz Nowell, AWS
-
Maintainers (@open-telemetry/lambda-extension-maintainers):
- Raphael Philipe Mendes da Silva, AWS
- Tyler Benson, Lightstep
-
Emeritus Maintainers:
- Alex Boten, Lightstep
- Anthony Mirabella, AWS
Learn more about roles in the community repository.