Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add requirement to use X-Ray propagation for aws-sdk client calls #3212

Merged
merged 24 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
204e26e
Add requirement to use X-Ray propagation for aws-sdk client calls
tylerbenson Feb 15, 2023
f9cc5b3
Add CHANGELOG entry and allow additional propagators.
tylerbenson Feb 16, 2023
ad17d8e
Add tracestate as another example.
tylerbenson Feb 16, 2023
4c5a56a
Additional rewording per review
tylerbenson Feb 16, 2023
86f8ee7
Merge branch 'main' into tyler/aws-sdk
tylerbenson Feb 21, 2023
b135bad
Apply suggestions from code review
tylerbenson Feb 22, 2023
adf69dc
Restructure and reformat.
tylerbenson Feb 22, 2023
6cedce9
Merge branch 'main' into tyler/aws-sdk
tylerbenson Feb 23, 2023
319939b
Update specification/trace/semantic_conventions/instrumentation/aws-s…
tylerbenson Feb 24, 2023
71b8989
Update specification/trace/semantic_conventions/instrumentation/aws-s…
tylerbenson Mar 1, 2023
1969fa3
Move context propagation details to compatibility section
tylerbenson Mar 3, 2023
4f941f8
Merge branch 'main' into tyler/aws-sdk
tylerbenson Mar 13, 2023
0e5d72a
Merge branch 'main' into tyler/aws-sdk
tylerbenson Mar 16, 2023
032c31d
Merge branch 'main' into tyler/aws-sdk
tylerbenson Apr 6, 2023
e782303
Elaborate on a few items of concern from various reviews.
tylerbenson Apr 6, 2023
b7f62c6
Changes requested by the TC
tylerbenson Apr 19, 2023
a9cce94
Merge branch 'main' into tyler/aws-sdk
tylerbenson Apr 19, 2023
fcdc55d
Apply suggestions from code review
tylerbenson May 3, 2023
2238fa6
Apply suggestions from code review
tylerbenson May 3, 2023
370a70a
Fix spacing/line breaks
tylerbenson May 3, 2023
cfa65ea
Merge branch 'main' into tyler/aws-sdk
tylerbenson May 3, 2023
6df04a4
Fix changelog
tylerbenson May 3, 2023
4751960
Merge branch 'main' into tyler/aws-sdk
reyang May 9, 2023
e53e4b5
Merge branch 'main' into tyler/aws-sdk
reyang May 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ release.
([#3298](https://github.com/open-telemetry/opentelemetry-specification/pull/3298))
- Rename `net.app.protocol.(name|version)` to `net.protocol.(name|version)`
([#3272](https://github.com/open-telemetry/opentelemetry-specification/pull/3272))
- Add requirement to use X-Ray propagation as default for aws-sdk client calls.
tylerbenson marked this conversation as resolved.
Show resolved Hide resolved
([#3212](https://github.com/open-telemetry/opentelemetry-specification/pull/3212))
- Replace `http.flavor` with `net.protocol.(name|version)`
([#3272](https://github.com/open-telemetry/opentelemetry-specification/pull/3272))
- Metric requirement levels are now stable
Expand Down
32 changes: 32 additions & 0 deletions specification/compatibility/aws.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Compatibility Considerations for AWS

**Status**: [Experimental](../document-status.md)

This document highlights compatibility considerations when interacting with AWS
managed services using an aws-sdk, a third-party library, or a direct HTTP request.

## Context Propagation

When making outgoing calls to AWS managed services using an aws-sdk, a third-party
library, or a direct HTTP request, an AWS service-supported propagation format MUST
be used to add context propagation to HTTP headers on the outgoing request in order
to propagate the context to services (AWS Lambda) indirectly triggered by such call.

Instrumentation MAY allow a different propagator to be explicitly provided to
the instrumentation, in which case the provided propagator MUST be used.

Propagation headers MUST be added before the signature is calculated to prevent errors on signed requests.

The following formats are currently natively supported by AWS services for propagation:

* [AWS X-Ray](https://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html)
tylerbenson marked this conversation as resolved.
Show resolved Hide resolved

AWS service-supported context propagation is necessary to allow context propagation
through AWS managed services, for example: `S3 -> SNS -> SQS -> Lambda`.

(See the [aws-lambda sqs-event semantic convention](../trace/semantic_conventions/instrumentation/aws-lambda.md#sqs-event)
doc for details on how this context propagation is consumed by Lambda instrumentation.)

Additional propagation formats MAY be applied to individual request types that support arbitrary attributes such as `SqsMessage`.
tylerbenson marked this conversation as resolved.
Show resolved Hide resolved
This can allow for transporting additional context that may not be supported by X-Ray, such as baggage or tracestate.
Documentation SHOULD advise that doing so is subject to attribute limits and billing impacts.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ For every message in the event, the [message system attributes][] (not message a
the user) SHOULD be checked for the key `AWSTraceHeader`. If it is present, an OpenTelemetry `Context` SHOULD be
parsed from the value of the attribute using the [AWS X-Ray Propagator](../../../context/api-propagators.md) and
added as a link to the span. This means the span may have as many links as messages in the batch.
See [compatibility](../../../compatibility/aws.md#context-propagation) for more info.

- [`faas.trigger`][faas] MUST be set to `pubsub`.
- [`messaging.operation`](../messaging.md) MUST be set to `process`.
Expand All @@ -122,6 +123,7 @@ corresponding to the SQS event. The [message system attributes][] (not message a
the user) SHOULD be checked for the key `AWSTraceHeader`. If it is present, an OpenTelemetry `Context` SHOULD be
parsed from the value of the attribute using the [AWS X-Ray Propagator](../../../context/api-propagators.md) and
added as a link to the span.
See [compatibility](../../../compatibility/aws.md#context-propagation) for more info.

- [`faas.trigger`][faas] MUST be set to `pubsub`.
- [`messaging.operation`](../messaging.md#messaging-attributes) MUST be set to `process`.
Expand Down
tylerbenson marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ are found.

Some descriptions are also provided for populating general OpenTelemetry semantic conventions based on these APIs.

## Context Propagation

See [compatibility](../../../compatibility/aws.md#context-propagation).

## Common Attributes

The span name MUST be of the format `Service.Operation` as per the AWS HTTP API, e.g., `DynamoDB.GetItem`,
Expand Down