diff --git a/CHANGELOG.md b/CHANGELOG.md index d5a94bca007..686d2f794cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ release. ### 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)) + ### Compatibility ## v1.2.0 (2021-04-14) @@ -46,7 +49,6 @@ 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)) -- Fix the inconsistent formatting of semantic convention enums ([#1598](https://github.com/open-telemetry/opentelemetry-specification/pull/1598/)) ### Compatibility diff --git a/specification/trace/semantic_conventions/instrumentation/aws-lambda.md b/specification/trace/semantic_conventions/instrumentation/aws-lambda.md index 9814df780d8..e61ec2822c9 100644 --- a/specification/trace/semantic_conventions/instrumentation/aws-lambda.md +++ b/specification/trace/semantic_conventions/instrumentation/aws-lambda.md @@ -218,3 +218,17 @@ 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 + +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