- Notifications
You must be signed in to change notification settings - Fork209
Create your own Lambda Layer in each OTel language using this starter code. Add the Lambda Layer to your Lambda Function to get tracing with OpenTelemetry.
License
open-telemetry/opentelemetry-lambda
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The OpenTelemetry Lambda Layers provide the OpenTelemetry (OTel) code to export telemetry asynchronously from AWS Lambda functions. It does this by embedding a stripped-down version ofOpenTelemetry Collector Contrib inside anAWS Lambda Extension Layer. This allows Lambda functions to use OpenTelemetry to send traces and metrics to any configured backend.
There are 2 types of lambda layers
- Collector Layer - Embeds a stripped down version of the OpenTelemetry Collector
- Language Specific Layer - Includes language specific nuances to allow lambda functions to automatically consume context from upstream callers, create spans, and automatically instrument the AWS SDK
These 2 layers are meant to be used in conjunction to instrument your lambda functions. The reason that the collector is not embedded in specific language layers is to give users flexibility
What exporters/receivers/processors are included from the OpenTelemetry Collector?
You can check outthe stripped-down collector's imports in this repository for a full list of currently included components.
Self-built binaries of the collector haveexperimental support for a custom set of connectors/exporters/receivers/processors. For more information, see(Experimental) Customized collector build
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 theReleases. 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 inthe Collector folder's README.
To get a better understanding of the proposed design for the OpenTelemetry Lambda extension, you can see theDesign 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 theTracerProvider
at the end of an invocation.
The Lambda instrumentation will flush theMeterProvider
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, Node.js 16 - notofficially supported by OpenTelemetry JS
See theContributing Guide for details.
- Serkan Özal, Catchpoint
- Tyler Benson, ServiceNow
For more information about the maintainer role, see thecommunity repository.
For more information about the approver role, see thecommunity repository.
For more information about the emeritus role, see thecommunity repository.
For more information about the emeritus role, see thecommunity repository.
About
Create your own Lambda Layer in each OTel language using this starter code. Add the Lambda Layer to your Lambda Function to get tracing with OpenTelemetry.
Topics
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.