Skip to content

Commit

Permalink
Resolved redundancy between AWS spec and AWS-specific db field tables…
Browse files Browse the repository at this point in the history
… in the db-spec.
  • Loading branch information
AlexanderWert committed Apr 29, 2021
1 parent 6dc1382 commit 3f255c2
Showing 1 changed file with 2 additions and 28 deletions.
30 changes: 2 additions & 28 deletions specs/agents/tracing-instrumentation-aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,12 @@ Some of the services can use existing specs. When there are differences or addit
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.cloud.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`.
Field semantics and values for S3 are defined in the [S3 table within the database spec](tracing-instrumentation-db.md#aws-s3).

### 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.
DynamoDB-specific specifications that supercede generic db field semantics are defined in the [DynamoDB table within the database spec](tracing-instrumentation-db.md#aws-dynamodb).

### SQS (Simple Queue Service)

Expand Down

0 comments on commit 3f255c2

Please sign in to comment.