Skip to content

Commit

Permalink
Add details for filling resource for AWS Lambda. (#1610)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuraag Agrawal authored Apr 15, 2021
1 parent b4ebec7 commit 7030952
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7030952

Please sign in to comment.