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

AWS SDK common and dynamodb conventions #1422

Merged
merged 37 commits into from
Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7f8fe28
Add semantic conventions for the AWS SDK.
Oct 15, 2020
b124776
Lint
Oct 15, 2020
1410a31
Initial MD -> YML
Oct 26, 2020
aa3b3b3
Fix
Oct 26, 2020
efcea38
Merge branch 'main' of github.com:open-telemetry/opentelemetry-specif…
Feb 10, 2021
e3e93a2
DynamoDB only
Feb 10, 2021
83b378c
Fix
Feb 10, 2021
faaad26
Update semantic_conventions/trace/instrumentation/aws-sdk.yml
anuraaga Feb 10, 2021
499a123
ref: aws.dynamodb
Feb 15, 2021
f801d4c
Update README
Feb 15, 2021
08bdd8e
Fix
Feb 15, 2021
81dc236
Copy brief
Feb 15, 2021
3a4e092
Inlined so don't need to show shared attributes
Feb 15, 2021
5f5fcbf
Update semantic_conventions/trace/instrumentation/aws-sdk.yml
anuraaga Feb 17, 2021
5e8db59
Shorten some names and no db.name
Feb 24, 2021
1777f83
Merge branch 'aws-sdk-conventions' of github.com:anuraaga/opentelemet…
Feb 24, 2021
28a9dc0
A duck is a duck
Feb 24, 2021
89446e9
Wording tweaks, rpc.system
Feb 24, 2021
9639b24
Don't lose the required
Feb 24, 2021
fe38bb2
Name
Feb 26, 2021
c65b660
Merge branch 'main' of github.com:open-telemetry/opentelemetry-specif…
Mar 4, 2021
1cfae0a
db.system / operation
Mar 4, 2021
4875126
Fix db.system
Mar 15, 2021
bf88561
Required
Mar 15, 2021
cce890b
Merge branch 'main' of github.com:open-telemetry/opentelemetry-specif…
Mar 19, 2021
edbab95
Update
Mar 19, 2021
01a9f62
Merge branch 'main' into aws-sdk-conventions
carlosalberto Mar 23, 2021
0a1860d
Merge branch 'main' of github.com:open-telemetry/opentelemetry-specif…
Mar 24, 2021
9896037
CHANGELOG
Mar 24, 2021
bdae745
Merge branch 'aws-sdk-conventions' of github.com:anuraaga/opentelemet…
Mar 24, 2021
dcae457
Merge branch 'main' of github.com:open-telemetry/opentelemetry-specif…
Mar 25, 2021
193755f
README
Mar 25, 2021
1b5cb8a
Consistency
Mar 25, 2021
582e065
Update CHANGELOG.md
Mar 26, 2021
2b10583
Fix table_name
Mar 27, 2021
4c78487
Merge branch 'aws-sdk-conventions' of github.com:anuraaga/opentelemet…
Mar 27, 2021
c38800c
Merge branch 'main' into aws-sdk-conventions
arminru Mar 30, 2021
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
6 changes: 5 additions & 1 deletion semantic_conventions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ The YAML descriptions of semantic convention contained in this directory are int
be used by the various OpenTelemetry language implementations to aid in automatic
generation of semantics-related code.

## Writing semantic conventions

Refer to the [syntax](./syntax.md) for how to write the YAML files for semantic conventions.

## Generation

These YAML files are used by the make target `table-generation` to generate consistently
formattted Markdown tables for all semantic conventions in the specification. Run it from the root of this repository using the command
formatted Markdown tables for all semantic conventions in the specification. Run it from the root of this repository using the command

```
make table-generation
Expand Down
373 changes: 373 additions & 0 deletions semantic_conventions/trace/instrumentation/aws-sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,373 @@
groups:
- id: aws
prefix: aws
brief: >
The `aws` conventions apply to operations using the AWS SDK. They map request or response parameters
in AWS SDK API calls to attributes on a Span. The conventions have been collected over time based
on feedback from AWS users of tracing and will continue to increase as new interesting conventions
anuraaga marked this conversation as resolved.
Show resolved Hide resolved
are found.

Some descriptions are also provided for populating general OpenTelemetry semantic conventions based on
these APIs.
attributes:
- id: service
type: string
brief: "The name of the service to which a request is made, as returned by the AWS SDK."
Oberon00 marked this conversation as resolved.
Show resolved Hide resolved
examples:
- DynamoDB
- S3
- id: operation
type: string
brief: "The name of the operation corresponding to the request, as returned by the AWS SDK"
examples:
- GetItem
- PutItem

- id: dynamodb.shared
extends: aws
prefix: aws.dynamodb
anuraaga marked this conversation as resolved.
Show resolved Hide resolved
brief: "Attributes that exist for multiple DynamoDB request types."
attributes:
- id: table_names
type: string[]
brief: The keys in the `RequestItems` object field in a request operating on multiple tables.
examples:
- Users
- Cats
- id: consumed_capacity
type: string[]
brief: "The JSON-serialized value of each item in the `ConsumedCapacity` response field."
anuraaga marked this conversation as resolved.
Show resolved Hide resolved
examples:
- '{
"CapacityUnits": number,
"GlobalSecondaryIndexes": {
"string" : {
"CapacityUnits": number,
"ReadCapacityUnits": number,
"WriteCapacityUnits": number
}
},
"LocalSecondaryIndexes": {
"string" : {
"CapacityUnits": number,
"ReadCapacityUnits": number,
"WriteCapacityUnits": number
}
},
"ReadCapacityUnits": number,
"Table": {
"CapacityUnits": number,
"ReadCapacityUnits": number,
"WriteCapacityUnits": number
},
"TableName": "string",
"WriteCapacityUnits": number
}'
- id: item_collection_metrics
type: string
brief: "The JSON-serialized value of the `ItemCollectionmetrics` response field."
examples:
- '{
"string" : [
{
"ItemCollectionKey": {
"string" : {
"B": blob,
"BOOL": boolean,
"BS": [ blob ],
"L": [
"AttributeValue"
],
"M": {
"string" : "AttributeValue"
},
"N": "string",
"NS": [ "string" ],
"NULL": boolean,
"S": "string",
"SS": [ "string" ]
}
},
"SizeEstimateRangeGB": [ number ]
}
]
}'
- id: provisioned_throughput.read_capacity_units
Oberon00 marked this conversation as resolved.
Show resolved Hide resolved
type: number
brief: "The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter."
examples:
- 1
- 2
- id: provisioned_throughput.write_capacity_units
type: number
brief: "The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter."
examples:
- 1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these are supposed to be double, but the generator only supports number I think, and the examples have to be integer.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC @thisthat I somehow thought this was already fixed, but open-telemetry/build-tools#13 is still open, so I may be mistaken.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have created open-telemetry/build-tools#30 :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1550 bumps the semconvgen reference to v0.3.0 which includes this change.

- 2
- id: consistent_read
type: boolean
brief: "The value of the `ConsistentRead` request parameter."
- id: projection_expression
type: string
brief: "The value of the `ProjectionExpression` request parameter."
examples:
- Title
- Title, Price, Color
- Title, Description, RelatedItems, ProductReviews
- id: limit
type: number
brief: "The value of the `Limit` request parameter."
examples:
- 10
- id: attributes_to_get
type: string[]
brief: "The value of the `AttributesToGet` request parameter."
examples:
- lives
- id
- id: index_name
type: string
brief: "The value of the `IndexName` request parameter."
examples:
- name_to_group
- id: select
type: string
brief: "The value of the `Select` request parameter."
examples:
- ALL_ATTRIBUTES
- COUNT

- id: dynamodb.batchgetitem
brief: DynamoDB.BatchGetItem
extends: aws
prefix: aws.dynamodb
attributes:
- ref: aws.dynamodb.table_names
- ref: aws.dynamodb.consumed_capacity

- id: dynamodb.batchwriteitem
brief: DynamoDB.BatchWriteItem
extends: aws
prefix: aws.dynamodb
attributes:
- ref: aws.dynamodb.table_names
- ref: aws.dynamodb.consumed_capacity
- ref: aws.dynamodb.item_collection_metrics

- id: dynamodb.createtable
brief: DynamoDB.CreateTable
extends: aws
prefix: aws.dynamodb
attributes:
- id: global_secondary_indexes
type: string[]
brief: "The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field"
examples:
- '{
"IndexName": "string",
"KeySchema": [
{
"AttributeName": "string",
"KeyType": "string"
}
],
"Projection": {
"NonKeyAttributes": [ "string" ],
"ProjectionType": "string"
},
"ProvisionedThroughput": {
"ReadCapacityUnits": number,
"WriteCapacityUnits": number
}
}'
- id: local_secondary_indexes
type: string[]
brief: "The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field."
examples:
- '{
"IndexArn": "string",
"IndexName": "string",
"IndexSizeBytes": number,
"ItemCount": number,
"KeySchema": [
{
"AttributeName": "string",
"KeyType": "string"
}
],
"Projection": {
"NonKeyAttributes": [ "string" ],
"ProjectionType": "string"
}
}'
- ref: aws.dynamodb.table_names
- ref: aws.dynamodb.consumed_capacity
- ref: aws.dynamodb.item_collection_metrics
- ref: aws.dynamodb.provisioned_throughput.read_capacity_units
- ref: aws.dynamodb.provisioned_throughput.write_capacity_units

- id: dynamodb.deleteitem
brief: DynamoDB.DeleteItem
extends: aws
prefix: aws.dynamodb
attributes:
- ref: aws.dynamodb.table_names
- ref: aws.dynamodb.consumed_capacity
- ref: aws.dynamodb.item_collection_metrics

- id: dynamodb.deletetable
brief: DynamoDB.DeleteTable
extends: aws
prefix: aws.dynamodb
attributes:
- ref: db.name
Oberon00 marked this conversation as resolved.
Show resolved Hide resolved
brief: "The value of the TableName request parameter."

- id: dynamodb.describetable
brief: DynamoDB.DescribeTable
extends: aws
prefix: aws.dynamodb
attributes:
- ref: db.name
brief: "The value of the TableName request parameter."

- id: dynamodb.getitem
brief: DynamoDB.GetItem
extends: aws
prefix: aws.dynamodb
attributes:
- ref: db.name
brief: "The value of the TableName request parameter."
- ref: aws.dynamodb.consumed_capacity
- ref: aws.dynamodb.consistent_read
- ref: aws.dynamodb.projection_expression

- id: dynamodb.listtables
brief: DynamoDB.ListTables
extends: aws
prefix: aws.dynamodb
attributes:
- id: exclusive_start_table_name
type: string
brief: "The value of the `ExclusiveStartTableName` request parameter."
examples:
- Users
- CatsTable
- id: table_count
type: number
brief: "The the number of items in the `TableNames` response parameter."
examples:
- 20
- ref: aws.dynamodb.limit

- id: dynamodb.putitem
brief: DynamoDB.PutItem
extends: aws
prefix: aws.dynamodb
attributes:
- ref: aws.dynamodb.table_names
- ref: aws.dynamodb.consumed_capacity
- ref: aws.dynamodb.item_collection_metrics

- id: dynamodb.query
brief: DynamoDB.Query
extends: aws
prefix: aws.dynamodb
attributes:
- id: scan_index_forward
type: boolean
brief: "The value of the `ScanIndexForward` request parameter."
- ref: db.name
brief: "The value of the TableName request parameter."
- ref: aws.dynamodb.consumed_capacity
- ref: aws.dynamodb.consistent_read
- ref: aws.dynamodb.limit
- ref: aws.dynamodb.projection_expression
- ref: aws.dynamodb.attributes_to_get
- ref: aws.dynamodb.index_name
- ref: aws.dynamodb.select

- id: dynamodb.scan
brief: DynamoDB.Scan
extends: aws
prefix: aws.dynamodb
attributes:
- id: segment
type: number
brief: "The value of the `Segment` request parameter."
examples:
- 10
- id: total_segments
type: number
brief: "The value of the `TotalSegments` request parameter."
examples:
- 100
- id: count
type: number
brief: "The value of the `Count` response parameter."
examples:
- 10
- id: scanned_count
type: number
brief: "The value of the `ScannedCount` response parameter."
examples:
- 50
- ref: db.name
brief: "The value of the TableName request parameter."
- ref: aws.dynamodb.consumed_capacity
- ref: aws.dynamodb.consistent_read
- ref: aws.dynamodb.limit
- ref: aws.dynamodb.projection_expression
- ref: aws.dynamodb.attributes_to_get
- ref: aws.dynamodb.index_name
- ref: aws.dynamodb.select

- id: dynamodb.updateitem
brief: DynamoDB.UpdateItem
extends: aws
prefix: aws.dynamodb
attributes:
- ref: aws.dynamodb.table_names
- ref: aws.dynamodb.consumed_capacity
- ref: aws.dynamodb.item_collection_metrics

- id: dynamodb.updatetable
brief: DynamoDB.UpdateTable
extends: aws
prefix: aws.dynamodb
attributes:
- id: attribute_definitions
type: string[]
brief: "The JSON-serialized value of each item in the `AttributeDefinitions` request field."
examples:
- '{
"AttributeName": "string",
"AttributeType": "string"
}'
- id: global_secondary_index_updates
type: string[]
brief: "The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field."
examples:
- '{
"Create": {
"IndexName": "string",
"KeySchema": [
{
"AttributeName": "string",
"KeyType": "string"
}
],
"Projection": {
"NonKeyAttributes": [ "string" ],
"ProjectionType": "string"
},
"ProvisionedThroughput": {
"ReadCapacityUnits": number,
"WriteCapacityUnits": number
}
}'
- ref: db.name
brief: "The value of the TableName request parameter."
- ref: aws.dynamodb.consumed_capacity
- ref: aws.dynamodb.provisioned_throughput.read_capacity_units
- ref: aws.dynamodb.provisioned_throughput.write_capacity_units
Loading