-
Notifications
You must be signed in to change notification settings - Fork 115
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
AWS services spec #415
Merged
Merged
AWS services spec #415
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
71228b9
Draft AWS services spec
estolfo d8f8a94
Add note about destination.region for DynamoDB
estolfo e6fbbff
Updates from review
estolfo e159b48
Add note about using message attributes as headers
estolfo 8a3429d
Rearrange ordering of statements
estolfo 34e3b3e
Clarify what to extract from a bucket Access Point
estolfo 68cb345
Update specs/agents/tracing-instrumentation-aws.md
estolfo d8af798
Update specs/agents/tracing-instrumentation-aws.md
estolfo 5845b6b
Specify that Access Points can use slashes or colons
estolfo e28a905
Add details for DynamoDB
estolfo d0d930c
Query should be capitalized for DynamoDb
estolfo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
## AWS services spans | ||
|
||
We describe how to instrument some of AWS' services in this document. | ||
Some of the services can use existing specs. When there are differences or additions, they have been noted below. | ||
|
||
### S3 (Simple Storage Service) | ||
|
||
AWS Simple Storage Service offers object storage via a REST API. The objects are organized into buckets, which are | ||
themselves organized into regions. | ||
|
||
- `span.name`: The span name should follow this pattern: `S3 <OperationName> <bucket-name>`. For example, | ||
`S3 GetObject my-bucket`. Note that the operation name is in CamelCase. | ||
- `span.type`: `storage` | ||
- `span.subtype`: `s3` | ||
- `span.action`: The operation name in CamelCase. For example ‘GetObject’. | ||
|
||
#### Span context fields | ||
|
||
- **`context.destination.address`**: optional. Not available in some cases. Only set if the actual connection is available. | ||
- **`context.destination.port`**: optional. Not available in some cases. Only set if the actual connection is available. | ||
- **`context.destination.region`**: mandatory. The AWS region where the bucket is. | ||
- **`context.destination.service.name`**: mandatory. Use `s3` | ||
- **`context.destination.service.resource`**: optional. The bucket name, if available. The s3 API allows either the | ||
bucket name or an Access Point to be provided when referring to a bucket. Access Points can use either slashes or colons. | ||
When an Access Point is provided, the access point name preceded by `accesspoint/` or `accesspoint:` should be extracted. | ||
For example, given an Access Point such as `arn:aws:s3:us-west-2:123456789012:accesspoint/myendpointslashes`, the agent | ||
extracts `accesspoint/myendpointslashes`. Given an Access Point such as | ||
`arn:aws:s3:us-west-2:123456789012:accesspoint:myendpointcolons`, the agent extracts `accesspoint:myendpointcolons`. | ||
- **`context.destination.service.type`**: mandatory. Use `storage`. | ||
|
||
### DynamoDB | ||
|
||
AWS DynamoDB is a document database so instrumenting it will follow the [db spec](tracing-instrumentation-db.md). | ||
The follow specifications supersede those of the db spec. | ||
|
||
- **`span.name`**: The span name should capture the operation name in CamelCase and the table name, if available. | ||
The format should be `DynamoDB <ActionName> <TableName>`. So for example, `DynamoDB UpdateItem my_table`. | ||
|
||
#### Span context fields | ||
- **`context.db.instance`**: mandatory. The AWS region where the table is. | ||
- **`context.db.statement`**: optional. For a DynamoDB `Query` operation, capture the `KeyConditionExpression` in this field. | ||
- **`context.destination.cloud.region`**: mandatory. The AWS region where the table is, if available. | ||
|
||
### SQS (Simple Queue Service) | ||
|
||
AWS Simple Queue Service is a message queuing service. The [messaging spec](tracing-instrumentation-messaging.md) can | ||
be used for instrumenting SQS, but the follow specifications supersede those of the messaging spec. | ||
|
||
- **`context.destination.cloud.region`**: mandatory. The AWS region where the queue is. | ||
|
||
For distributed tracing, the SQS API has "message attributes" that can be used in lieu of headers. | ||
|
||
### SNS (AWS Simple Notification Service) | ||
|
||
The AWS Simple Notification Service can be instrumented using the [messaging spec](tracing-instrumentation-messaging.md), | ||
but the only action that is instrumented is `PUBLISH`. These specifications supersede those of the messaging spec: | ||
|
||
- `span.name`: The span name should follow this pattern: `SNS PUBLISH <TOPIC-NAME>`. For example, | ||
`SNS PUBLISH MyTopic`. | ||
|
||
- **`context.destination.cloud.region`**: mandatory. The AWS region where the topic is. | ||
|
||
For distributed tracing, the SNS API has "message attributes" that can be used in lieu of headers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a new field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned over at elastic/ecs#1282, I'd prefer if we called this
context.destination.cloud.region
. We might later want to add availability zone (could be useful for detecting cross-AZ traffic), and it would be nice to have a common prefix that is cloud-specific.