Skip to content

Commit

Permalink
Update Layer versions for lambda layer release April 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
vasireddy99 authored and carolabadeer committed Apr 28, 2023
1 parent e18af67 commit 5339701
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 22 deletions.
45 changes: 31 additions & 14 deletions src/docs/getting-started/lambda.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,20 @@ The AWS Distro for OpenTelemetry now supports AWS Distro for OpenTelemetry Lambd
See the documentation on the [OpenTelemetry Lambda repository](https://github.com/open-telemetry/opentelemetry-lambda/).

## Custom configuration for the ADOT Collector on Lambda
The ADOT Lambda layers combines both OpenTelemetry and the ADOT Collector.
The ADOT Lambda layers combines both OpenTelemetry SDK and the ADOT Collector components.
The configuration of the ADOT Collector follows the OpenTelemetry standard.
By default, the ADOT Lambda layer uses [config.yaml](https://github.com/aws-observability/aws-otel-lambda/blob/main/adot/collector/config.yaml),
which exports telemetry data to AWS X-Ray.

Please find the list of available components supported for custom configuration [here](https://github.com/aws-observability/aws-otel-lambda/blob/main/README.md#adot-lambda-layer-available-components). To enable debugging, you can use the configuration file to set log level to debug. See the example below.

To customize the collector configuration, add a configuration yaml file to your function code.
Once the file has been deployed with a Lambda function, create an environment variable on your Lambda
function `OPENTELEMETRY_COLLECTOR_CONFIG_FILE` and set it to `/var/task/*<path/<to>/<filename>*`.
The ADOT Lambda Layer support the following types of confmap providers: file, env, yaml, http, https and s3. To customize the ADOT collector configuration using different Confmap providers, Please refer to [Confmap providers](/docs/components/confmap-providers#confmap-providers-supported-by-the-adot-collector) section.
Once your collector configuration is set through a `confmap` providers.
Create an environment variable on your Lambda function `OPENTELEMETRY_COLLECTOR_CONFIG_FILE` and set the path of configuration w.r.t to the confmap provider as its value. for e.g, if you are using a file configmap provider, set its value to `/var/task/*<path/<to>/<filename>*`.
This will tell the extension where to find the collector configuration.

Here is a sample configuration file, collector.yaml in the root directory:
Here is a sample configuration file of collector.yaml in the root directory:

```yaml
#collector.yaml in the root directory
#Set an environemnt variable 'OPENTELEMETRY_COLLECTOR_CONFIG_FILE' to '/var/task/collector.yaml'
Expand All @@ -53,32 +54,35 @@ receivers:
otlp:
protocols:
grpc:
endpoint: "localhost:4317"
http:
endpoint: "localhost:4318"

exporters:
logging:
loglevel: debug
awsxray:

#enables output for traces to xray
service:
pipelines:
traces:
receivers: [otlp]
exporters: [logging, awsxray]
exporters: [awsxray]
metrics:
receivers: [otlp]
exporters: [logging]
telemetry:
metrics:
address: localhost:8888

```
You can set this via the Lambda console, or via the AWS CLI.
```
aws lambda update-function-configuration --function-name Function --environment Variables={OPENTELEMETRY_COLLECTOR_CONFIG_FILE=/var/task/collector.yaml}
```

As an alternative to uploading your collector.yaml file directly with your code, you can zip your file and upload your zip as a separate Lambda layer.
You can set this via the Lambda console, or via the AWS CLI.
```
aws lambda update-function-configuration --function-name Function --environment Variables={OPENTELEMETRY_COLLECTOR_CONFIG_FILE=/opt/collector.yaml}
aws lambda update-function-configuration --function-name Function --environment Variables={OPENTELEMETRY_COLLECTOR_CONFIG_FILE=/var/task/collector.yaml}
```

You can configure environment variables via **CloudFormation** template as well:

```yaml
Function:
Type: AWS::Serverless::Function
Expand All @@ -88,6 +92,19 @@ Function:
Variables:
OPENTELEMETRY_COLLECTOR_CONFIG_FILE: /var/task/collector.yaml
```
Also, to load configuration from an S3 object
```yaml
Function:
Type: AWS::Serverless::Function
Properties:
...
Environment:
Variables:
OPENTELEMETRY_COLLECTOR_CONFIG_FILE: s3://<bucket_name>.s3.<region>.amazonaws.com/collector_config.yaml
```
Loading configuration from S3 will require that the IAM role attached to your function includes read access to the relevant bucket.
For more information about ADOT Collector configuration, such as adding ca/cert/key files, see the Github [README.md](https://github.com/aws-observability/aws-otel-lambda/blob/main/README.md).
Expand Down
2 changes: 1 addition & 1 deletion src/docs/getting-started/lambda/lambda-dotnet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Find the supported regions and amd64(x86_64)/arm64 layer ARN in the table below

|Supported Regions |Lambda layer ARN format | Contents |
|---------------------|-------------------------|----------|
| ap-northeast-1<br/>ap-northeast-2<br/>ap-south-1<br/>ap-southeast-1<br/>ap-southeast-2<br/>ca-central-1<br/>eu-central-1<br/>eu-north-1<br/>eu-west-1<br/>eu-west-2<br/>eu-west-3<br/>sa-east-1<br/>us-east-1<br/>us-east-2<br/>us-west-1<br/>us-west-2 | arn:aws:lambda:<region\>:901920570463:layer:aws-otel-collector-<architecture\>-ver-0-72-0:1 | Contains the [ADOT Collector for Lambda v0.27.0](https://github.com/aws-observability/aws-otel-lambda/releases/tag/adot%2Fcollector%2Flambdacomponents%2Fv0.27.0)|
| ap-northeast-1<br/>ap-northeast-2<br/>ap-south-1<br/>ap-southeast-1<br/>ap-southeast-2<br/>ca-central-1<br/>eu-central-1<br/>eu-north-1<br/>eu-west-1<br/>eu-west-2<br/>eu-west-3<br/>sa-east-1<br/>us-east-1<br/>us-east-2<br/>us-west-1<br/>us-west-2 | arn:aws:lambda:<region\>:901920570463:layer:aws-otel-collector-<architecture\>-ver-0-74-0:1 | Contains ADOT Collector v0.28.0 |

### Enable Tracing
Once you’ve instrumented the Lambda function code and deployed to Lambda service, you can follow the instructions below to apply Lambda layer.
Expand Down
2 changes: 1 addition & 1 deletion src/docs/getting-started/lambda/lambda-go.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Find the supported regions and amd64(x86_64)/arm64 layer ARN in the table below

|Supported Regions |Lambda layer ARN format | Contents |
|---------------------|-------------------------|----------|
| ap-northeast-1<br/>ap-northeast-2<br/>ap-south-1<br/>ap-southeast-1<br/>ap-southeast-2<br/>ca-central-1<br/>eu-central-1<br/>eu-north-1<br/>eu-west-1<br/>eu-west-2<br/>eu-west-3<br/>sa-east-1<br/>us-east-1<br/>us-east-2<br/>us-west-1<br/>us-west-2 | arn:aws:lambda:<region\>:901920570463:layer:aws-otel-collector-<architecture\>-ver-0-72-0:1 | Contains the [ADOT Collector for Lambda v0.27.0](https://github.com/aws-observability/aws-otel-lambda/releases/tag/adot%2Fcollector%2Flambdacomponents%2Fv0.27.0)|
| ap-northeast-1<br/>ap-northeast-2<br/>ap-south-1<br/>ap-southeast-1<br/>ap-southeast-2<br/>ca-central-1<br/>eu-central-1<br/>eu-north-1<br/>eu-west-1<br/>eu-west-2<br/>eu-west-3<br/>sa-east-1<br/>us-east-1<br/>us-east-2<br/>us-west-1<br/>us-west-2 | arn:aws:lambda:<region\>:901920570463:layer:aws-otel-collector-<architecture\>-ver-0-74-0:1 | Contains ADOT Collector v0.28.0 |

### Enable Tracing
Once you’ve instrumented the Lambda function code and deployed to Lambda service, you can follow the instructions below to apply Lambda layer.
Expand Down
3 changes: 2 additions & 1 deletion src/docs/getting-started/lambda/lambda-java-auto-instr.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ Find the supported regions and amd64(x86_64)/arm64 layer ARN in the table below

|Supported Regions |Lambda layer ARN format | Contents |
|---------------------|-------------------------|----------|
| ap-northeast-1<br/>ap-northeast-2<br/>ap-south-1<br/>ap-southeast-1<br/>ap-southeast-2<br/>ca-central-1<br/>eu-central-1<br/>eu-north-1<br/>eu-west-1<br/>eu-west-2<br/>eu-west-3<br/>sa-east-1<br/>us-east-1<br/>us-east-2<br/>us-west-1<br/>us-west-2 | arn:aws:lambda:<region\>:901920570463:layer:aws-otel-java-agent-<architecture\>-ver-1-23-0:1 | Contains [ADOT Java Auto-Instrumentation Agent v1.23.0](https://github.com/aws-observability/aws-otel-java-instrumentation/releases/tag/v1.23.0) <br/><br/> Contains the [ADOT Collector for Lambda v0.27.0](https://github.com/aws-observability/aws-otel-lambda/releases/tag/adot%2Fcollector%2Flambdacomponents%2Fv0.27.0) |
| ap-northeast-1<br/>ap-northeast-2<br/>ap-south-1<br/>ap-southeast-1<br/>ap-southeast-2<br/>ca-central-1<br/>eu-central-1<br/>eu-north-1<br/>eu-west-1<br/>eu-west-2<br/>eu-west-3<br/>sa-east-1<br/>us-east-1<br/>us-east-2<br/>us-west-1<br/>us-west-2 | arn:aws:lambda:<region\>:901920570463:layer:aws-otel-java-agent-<architecture\>-ver-1-24-0:1 | Contains [ADOT Java Auto-Instrumentation Agent v1.24.0](https://github.com/aws-observability/aws-otel-java-instrumentation/releases/tag/v1.24.0) <br/><br/> Contains ADOT Collector v0.28.0 |

### Enable auto-instrumentation for your Lambda function

To enable the AWS Distro for OpenTelemetry in your Lambda function, you need to add and configure the layer, and then enable tracing.
Expand Down
4 changes: 1 addition & 3 deletions src/docs/getting-started/lambda/lambda-java.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Find the supported regions and amd64(x86_64)/arm64 layer ARN in the table below

|Supported Regions |Lambda layer ARN format | Contents |
|---------------------|-------------------------|----------|
| ap-northeast-1<br/>ap-northeast-2<br/>ap-south-1<br/>ap-southeast-1<br/>ap-southeast-2<br/>ca-central-1<br/>eu-central-1<br/>eu-north-1<br/>eu-west-1<br/>eu-west-2<br/>eu-west-3<br/>sa-east-1<br/>us-east-1<br/>us-east-2<br/>us-west-1<br/>us-west-2 | arn:aws:lambda:<region\>:901920570463:layer:aws-otel-java-wrapper-<architecture\>-ver-1-23-0:1 | Contains [OpenTelemetry for Java v1.23.1](https://github.com/open-telemetry/opentelemetry-java/releases/tag/v1.23.1) with [Java Instrumentation v1.23.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.23.0) <br/><br/> Contains the [ADOT Collector for Lambda v0.27.0](https://github.com/aws-observability/aws-otel-lambda/releases/tag/adot%2Fcollector%2Flambdacomponents%2Fv0.27.0) |
| ap-northeast-1<br/>ap-northeast-2<br/>ap-south-1<br/>ap-southeast-1<br/>ap-southeast-2<br/>ca-central-1<br/>eu-central-1<br/>eu-north-1<br/>eu-west-1<br/>eu-west-2<br/>eu-west-3<br/>sa-east-1<br/>us-east-1<br/>us-east-2<br/>us-west-1<br/>us-west-2 | arn:aws:lambda:<region\>:901920570463:layer:aws-otel-java-wrapper-<architecture\>-ver-1-24-0:1 | Contains [OpenTelemetry for Java v1.24.0](https://github.com/open-telemetry/opentelemetry-java/releases/tag/v1.24.0) with [Java Instrumentation v1.24.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.24.0) <br/><br/> Contains ADOT Collector v0.28.0 |

### Enable auto-instrumentation for your Lambda function
To enable the AWS Distro for OpenTelemetry in your Lambda function, you need to add and configure the layer, and then enable tracing.
Expand All @@ -54,8 +54,6 @@ To enable the AWS Distro for OpenTelemetry in your Lambda function, you need to
4. `/opt/otel-sqs-handler` - for wrapping SQS-triggered function handlers (implementing RequestHandler)
5. [Enable active tracing](https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html) for your AWS Lambda function.



Tips:

* By default, the layer is configured to export traces to AWS X-Ray.
Expand Down
2 changes: 1 addition & 1 deletion src/docs/getting-started/lambda/lambda-js.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Find the supported regions and amd64(x86_64)/arm64 layer ARN in the table below

|Supported Regions |Lambda layer ARN format | Contents |
|---------------------|-------------------------|----------|
| ap-northeast-1<br/>ap-northeast-2<br/>ap-south-1<br/>ap-southeast-1<br/>ap-southeast-2<br/>ca-central-1<br/>eu-central-1<br/>eu-north-1<br/>eu-west-1<br/>eu-west-2<br/>eu-west-3<br/>sa-east-1<br/>us-east-1<br/>us-east-2<br/>us-west-1<br/>us-west-2 | arn:aws:lambda:<region\>:901920570463:layer:aws-otel-nodejs-<architecture\>-ver-1-9-1:2 |Contains [OpenTelemetry for JavaScript v1.9.1](https://github.com/open-telemetry/opentelemetry-js/releases/tag/v1.9.1) with [Lambda instrumentation v0.35.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/instrumentation-aws-lambda-v0.35.0) <br/><br/> Contains the [ADOT Collector for Lambda v0.27.0](https://github.com/aws-observability/aws-otel-lambda/releases/tag/adot%2Fcollector%2Flambdacomponents%2Fv0.27.0)|
| ap-northeast-1<br/>ap-northeast-2<br/>ap-south-1<br/>ap-southeast-1<br/>ap-southeast-2<br/>ca-central-1<br/>eu-central-1<br/>eu-north-1<br/>eu-west-1<br/>eu-west-2<br/>eu-west-3<br/>sa-east-1<br/>us-east-1<br/>us-east-2<br/>us-west-1<br/>us-west-2 | arn:aws:lambda:<region\>:901920570463:layer:aws-otel-nodejs-<architecture\>-ver-1-12-0:1 |Contains [OpenTelemetry for JavaScript v1.12.0](https://github.com/open-telemetry/opentelemetry-js/releases/tag/v1.12.0) with [Lambda instrumentation v0.35.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/instrumentation-aws-lambda-v0.35.0) <br/><br/> Contains ADOT Collector v0.28.0 |

### Enable auto-instrumentation for your Lambda function
To enable the AWS Distro for OpenTelemetry in your Lambda function, you need to add and configure the layer, and then enable tracing.
Expand Down
2 changes: 1 addition & 1 deletion src/docs/getting-started/lambda/lambda-python.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Find the supported regions and amd64(x86_64)/arm64 layer ARN in the table below

|Supported Regions |Lambda layer ARN format | Contents |
|---------------------|-------------------------|----------|
| ap-northeast-1<br/>ap-northeast-2<br/>ap-south-1<br/>ap-southeast-1<br/>ap-southeast-2<br/>ca-central-1<br/>eu-central-1<br/>eu-north-1<br/>eu-west-1<br/>eu-west-2<br/>eu-west-3<br/>sa-east-1<br/>us-east-1<br/>us-east-2<br/>us-west-1<br/>us-west-2 | arn:aws:lambda:<region\>:901920570463:layer:aws-otel-python-<architecture\>-ver-1-16-0:2 | Contains [OpenTelemetry Python v1.16.0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.16.0) <br/><br/> Contains the [ADOT Collector for Lambda v0.27.0](https://github.com/aws-observability/aws-otel-lambda/releases/tag/adot%2Fcollector%2Flambdacomponents%2Fv0.27.0)|
| ap-northeast-1<br/>ap-northeast-2<br/>ap-south-1<br/>ap-southeast-1<br/>ap-southeast-2<br/>ca-central-1<br/>eu-central-1<br/>eu-north-1<br/>eu-west-1<br/>eu-west-2<br/>eu-west-3<br/>sa-east-1<br/>us-east-1<br/>us-east-2<br/>us-west-1<br/>us-west-2 | arn:aws:lambda:<region\>:901920570463:layer:aws-otel-python-<architecture\>-ver-1-17-0:1 | Contains [OpenTelemetry Python v1.17.0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.17.0) <br/><br/> Contains ADOT Collector v0.28.0 |

### Enable auto-instrumentation for your Lambda function
To enable the AWS Distro for OpenTelemetry in your Lambda function, you need to add and configure the layer, and then enable tracing.
Expand Down

0 comments on commit 5339701

Please sign in to comment.