From b5ff4d60b85b1e18e17af0d46bd4ac771bf7312f Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Fri, 9 Apr 2021 16:21:05 +0900 Subject: [PATCH 1/5] Add details for filling resource for AWS Lambda. --- .../semantic_conventions/instrumentation/aws-lambda.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/specification/trace/semantic_conventions/instrumentation/aws-lambda.md b/specification/trace/semantic_conventions/instrumentation/aws-lambda.md index 9814df780d8..1aae00c1f46 100644 --- a/specification/trace/semantic_conventions/instrumentation/aws-lambda.md +++ b/specification/trace/semantic_conventions/instrumentation/aws-lambda.md @@ -218,3 +218,12 @@ have a parent of `Span Lambda`. This means the hierarchy looks like: Span Lambda --> Span ProcBatch --> Span Proc1 (links to Span Prod1 and Span Prod2) \-> Span Proc2 (links to Span Prod1 and Span Prod2) ``` + +## Resource Detector + +AWS Lambda resource information is available as environment variables provided by the runtime. + +- [`cloud.provider`](../../../resource/semantic_conventions/cloud.md) MUST be set to `aws` +- [`cloud.region`](../../../resource/semantic_conventions/cloud.md) MUST be set to the value of the `AWS_REGION` environment variable +- [`faas.name`](../../../resource/semantic_conventions/faas.md) MUST be set to the value of the `AWS_LAMBDA_FUNCTION_NAME` environment variable +- [`faas.version`](../../../resource/semantic_conventions/faas.md) MUST be set to the value of the `AWS_LAMBDA_FUNCTION_VERSION` environment variable From a749f017149c82ba77d38b133d407580885d26d6 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Fri, 9 Apr 2021 16:22:02 +0900 Subject: [PATCH 2/5] CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 625a3eace5b..bf0a0d08311 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ release. - Add details for filling semantic conventions for AWS Lambda ([#1442](https://github.com/open-telemetry/opentelemetry-specification/pull/1442)) - Update semantic conventions to distinguish between int and double ([#1550](https://github.com/open-telemetry/opentelemetry-specification/pull/1550)) - Add semantic convention for AWS ECS task revision ([#1581](https://github.com/open-telemetry/opentelemetry-specification/pull/1581)) +- Add details for filling resource for AWS Lambda([#1610](https://github.com/open-telemetry/opentelemetry-specification/pull/1610)) ### Compatibility From 4c25219cef391ede0d73da0766f616f3fcf38089 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Mon, 12 Apr 2021 12:43:56 +0900 Subject: [PATCH 3/5] faas.id note --- .../trace/semantic_conventions/instrumentation/aws-lambda.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/trace/semantic_conventions/instrumentation/aws-lambda.md b/specification/trace/semantic_conventions/instrumentation/aws-lambda.md index 1aae00c1f46..a15a7aba99a 100644 --- a/specification/trace/semantic_conventions/instrumentation/aws-lambda.md +++ b/specification/trace/semantic_conventions/instrumentation/aws-lambda.md @@ -227,3 +227,6 @@ AWS Lambda resource information is available as environment variables provided b - [`cloud.region`](../../../resource/semantic_conventions/cloud.md) MUST be set to the value of the `AWS_REGION` environment variable - [`faas.name`](../../../resource/semantic_conventions/faas.md) MUST be set to the value of the `AWS_LAMBDA_FUNCTION_NAME` environment variable - [`faas.version`](../../../resource/semantic_conventions/faas.md) MUST be set to the value of the `AWS_LAMBDA_FUNCTION_VERSION` environment variable + +Note that [`faas.id`](../../../resource/semantic_conventions/faas.md) currently cannot be populated to resource +because it is not available until function invocation. From dbaf5a37a2ba525a186fd36e6929c45b7eb44335 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Tue, 13 Apr 2021 12:15:06 +0900 Subject: [PATCH 4/5] Link to vars --- .../trace/semantic_conventions/instrumentation/aws-lambda.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specification/trace/semantic_conventions/instrumentation/aws-lambda.md b/specification/trace/semantic_conventions/instrumentation/aws-lambda.md index a15a7aba99a..e61ec2822c9 100644 --- a/specification/trace/semantic_conventions/instrumentation/aws-lambda.md +++ b/specification/trace/semantic_conventions/instrumentation/aws-lambda.md @@ -221,7 +221,7 @@ Span Lambda --> Span ProcBatch --> Span Proc1 (links to Span Prod1 and Span Prod ## Resource Detector -AWS Lambda resource information is available as environment variables provided by the runtime. +AWS Lambda resource information is available as [environment variables][] provided by the runtime. - [`cloud.provider`](../../../resource/semantic_conventions/cloud.md) MUST be set to `aws` - [`cloud.region`](../../../resource/semantic_conventions/cloud.md) MUST be set to the value of the `AWS_REGION` environment variable @@ -230,3 +230,5 @@ AWS Lambda resource information is available as environment variables provided b Note that [`faas.id`](../../../resource/semantic_conventions/faas.md) currently cannot be populated to resource because it is not available until function invocation. + +[environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime From 1338973c581428376e9910830f298921b810df31 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Thu, 15 Apr 2021 17:54:36 +0200 Subject: [PATCH 5/5] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65e50e81aa1..686d2f794cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ release. ### Logs ### Semantic Conventions + - Fix the inconsistent formatting of semantic convention enums ([#1598](https://github.com/open-telemetry/opentelemetry-specification/pull/1598/)) - Add details for filling resource for AWS Lambda([#1610](https://github.com/open-telemetry/opentelemetry-specification/pull/1610))