Skip to content

Commit 4c6777a

Browse files
authored
Merge branch 'main' into lambdaRelease
2 parents e18af67 + 5cdb5a5 commit 4c6777a

File tree

7 files changed

+39
-22
lines changed

7 files changed

+39
-22
lines changed

src/docs/getting-started/lambda.mdx

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,21 @@ The AWS Distro for OpenTelemetry now supports AWS Distro for OpenTelemetry Lambd
3232
See the documentation on the [OpenTelemetry Lambda repository](https://github.com/open-telemetry/opentelemetry-lambda/).
3333

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

4040
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.
4141

42-
To customize the collector configuration, add a configuration yaml file to your function code.
43-
Once the file has been deployed with a Lambda function, create an environment variable on your Lambda
44-
function `OPENTELEMETRY_COLLECTOR_CONFIG_FILE` and set it to `/var/task/*<path/<to>/<filename>*`.
42+
The ADOT Lambda Layers supports 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 for more information.
43+
44+
Once your collector configuration is set through a `confmap` providers.
45+
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>*`.
4546
This will tell the extension where to find the collector configuration.
4647

47-
Here is a sample configuration file, collector.yaml in the root directory:
48+
Here is a sample configuration file of collector.yaml in the root directory:
49+
4850
```yaml
4951
#collector.yaml in the root directory
5052
#Set an environemnt variable 'OPENTELEMETRY_COLLECTOR_CONFIG_FILE' to '/var/task/collector.yaml'
@@ -53,32 +55,35 @@ receivers:
5355
otlp:
5456
protocols:
5557
grpc:
58+
endpoint: "localhost:4317"
5659
http:
60+
endpoint: "localhost:4318"
5761

5862
exporters:
5963
logging:
60-
loglevel: debug
6164
awsxray:
6265

63-
#enables output for traces to xray
6466
service:
6567
pipelines:
6668
traces:
6769
receivers: [otlp]
68-
exporters: [logging, awsxray]
70+
exporters: [awsxray]
71+
metrics:
72+
receivers: [otlp]
73+
exporters: [logging]
74+
telemetry:
75+
metrics:
76+
address: localhost:8888
77+
6978
```
7079
You can set this via the Lambda console, or via the AWS CLI.
71-
```
72-
aws lambda update-function-configuration --function-name Function --environment Variables={OPENTELEMETRY_COLLECTOR_CONFIG_FILE=/var/task/collector.yaml}
73-
```
7480

75-
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.
76-
You can set this via the Lambda console, or via the AWS CLI.
7781
```
78-
aws lambda update-function-configuration --function-name Function --environment Variables={OPENTELEMETRY_COLLECTOR_CONFIG_FILE=/opt/collector.yaml}
82+
aws lambda update-function-configuration --function-name Function --environment Variables={OPENTELEMETRY_COLLECTOR_CONFIG_FILE=/var/task/collector.yaml}
7983
```
8084

8185
You can configure environment variables via **CloudFormation** template as well:
86+
8287
```yaml
8388
Function:
8489
Type: AWS::Serverless::Function
@@ -88,6 +93,19 @@ Function:
8893
Variables:
8994
OPENTELEMETRY_COLLECTOR_CONFIG_FILE: /var/task/collector.yaml
9095
```
96+
Also, to load configuration from an S3 object
97+
98+
```yaml
99+
Function:
100+
Type: AWS::Serverless::Function
101+
Properties:
102+
...
103+
Environment:
104+
Variables:
105+
OPENTELEMETRY_COLLECTOR_CONFIG_FILE: s3://<bucket_name>.s3.<region>.amazonaws.com/collector_config.yaml
106+
```
107+
108+
Loading configuration from S3 will require that the IAM role attached to your function includes read access to the relevant bucket.
91109
92110
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).
93111

src/docs/getting-started/lambda/lambda-dotnet.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Find the supported regions and amd64(x86_64)/arm64 layer ARN in the table below
6969

7070
|Supported Regions |Lambda layer ARN format | Contents |
7171
|---------------------|-------------------------|----------|
72-
| 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)|
72+
| 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 |
7373

7474
### Enable Tracing
7575
Once you’ve instrumented the Lambda function code and deployed to Lambda service, you can follow the instructions below to apply Lambda layer.

src/docs/getting-started/lambda/lambda-go.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Find the supported regions and amd64(x86_64)/arm64 layer ARN in the table below
8787

8888
|Supported Regions |Lambda layer ARN format | Contents |
8989
|---------------------|-------------------------|----------|
90-
| 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)|
90+
| 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 |
9191

9292
### Enable Tracing
9393
Once you’ve instrumented the Lambda function code and deployed to Lambda service, you can follow the instructions below to apply Lambda layer.

src/docs/getting-started/lambda/lambda-java-auto-instr.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ Find the supported regions and amd64(x86_64)/arm64 layer ARN in the table below
2929

3030
|Supported Regions |Lambda layer ARN format | Contents |
3131
|---------------------|-------------------------|----------|
32-
| 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) |
32+
| 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 |
33+
3334
### Enable auto-instrumentation for your Lambda function
3435

3536
To enable the AWS Distro for OpenTelemetry in your Lambda function, you need to add and configure the layer, and then enable tracing.

src/docs/getting-started/lambda/lambda-java.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Find the supported regions and amd64(x86_64)/arm64 layer ARN in the table below
3939

4040
|Supported Regions |Lambda layer ARN format | Contents |
4141
|---------------------|-------------------------|----------|
42-
| 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) |
42+
| 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 |
4343

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

57-
58-
5957
Tips:
6058

6159
* By default, the layer is configured to export traces to AWS X-Ray.

src/docs/getting-started/lambda/lambda-js.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Find the supported regions and amd64(x86_64)/arm64 layer ARN in the table below
2929

3030
|Supported Regions |Lambda layer ARN format | Contents |
3131
|---------------------|-------------------------|----------|
32-
| 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)|
32+
| 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 |
3333

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

src/docs/getting-started/lambda/lambda-python.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Find the supported regions and amd64(x86_64)/arm64 layer ARN in the table below
3232

3333
|Supported Regions |Lambda layer ARN format | Contents |
3434
|---------------------|-------------------------|----------|
35-
| 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)|
35+
| 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 |
3636

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

0 commit comments

Comments
 (0)