From 780b27bb4990d33d23b75d55752235a6e18d9cc3 Mon Sep 17 00:00:00 2001 From: Alan Storm Date: Tue, 6 Jul 2021 14:55:32 -0700 Subject: [PATCH 1/2] fix: DynamoDB edge cases. --- specs/agents/tracing-instrumentation-db.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/agents/tracing-instrumentation-db.md b/specs/agents/tracing-instrumentation-db.md index 2f8c7951..1e43cf3b 100644 --- a/specs/agents/tracing-instrumentation-db.md +++ b/specs/agents/tracing-instrumentation-db.md @@ -44,13 +44,13 @@ The following fields are relevant for database and datastore spans. Where possib | Field | Value / Examples | Comments | |-------|:---------------:|----------| -|`name`| e.g. `DynamoDB UpdateItem my_table`| The span name should capture the operation name (as used by AWS for the action name) and the table name, if available. The format should be `DynamoDB `. | +|`name`| e.g. `DynamoDB UpdateItem my_table`| The span name should capture the operation name (as used by AWS for the action name) and the table name, if available. The format should be `DynamoDB `. TableName MAY be omitted from the name for operations (`batchWriteItem`, `batchGetItem`, PartiQL-related methods like `executeStatement` etc.) that are acting on more than a single table. If `TableName` is not available, agents SHOULD also check the `TableArn` or `SourceTableArn` query params for a table name.| |`type`|`db`| |`subtype`|`dynamodb`| |`action`| `query` | | __**context.db._**__ |
|
| |`_.instance`| e.g. `us-east-1` | The AWS region where the table is. | -|`_.statement`| e.g. `ForumName = :name and Subject = :sub` | For a DynamoDB Query operation, capture the KeyConditionExpression in this field. | +|`_.statement`| e.g. `ForumName = :name and Subject = :sub` | For a DynamoDB Query operation, capture the KeyConditionExpression in this field. Agents MAY include the full SQL statment for PartiQL-related methods like `executeStatment.| |`_.type`|`dynamodb`| |`_.user`| :heavy_minus_sign: | |`_.link`| :heavy_minus_sign: | From 0751e61d40d470dd5bfe25c43673de4cbddd97b4 Mon Sep 17 00:00:00 2001 From: Alan Storm Date: Wed, 14 Jul 2021 12:08:11 -0700 Subject: [PATCH 2/2] fix: updates from feedback --- specs/agents/tracing-instrumentation-db.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/agents/tracing-instrumentation-db.md b/specs/agents/tracing-instrumentation-db.md index 1e43cf3b..a08b54be 100644 --- a/specs/agents/tracing-instrumentation-db.md +++ b/specs/agents/tracing-instrumentation-db.md @@ -44,13 +44,13 @@ The following fields are relevant for database and datastore spans. Where possib | Field | Value / Examples | Comments | |-------|:---------------:|----------| -|`name`| e.g. `DynamoDB UpdateItem my_table`| The span name should capture the operation name (as used by AWS for the action name) and the table name, if available. The format should be `DynamoDB `. TableName MAY be omitted from the name for operations (`batchWriteItem`, `batchGetItem`, PartiQL-related methods like `executeStatement` etc.) that are acting on more than a single table. If `TableName` is not available, agents SHOULD also check the `TableArn` or `SourceTableArn` query params for a table name.| +|`name`| e.g. `DynamoDB UpdateItem my_table`| The span name should capture the operation name (as used by AWS for the action name) and the table name, if available. The format should be `DynamoDB `. TableName MAY be omitted from the name for operations (`batchWriteItem`, `batchGetItem`, PartiQL-related methods like `executeStatement` etc.) that are acting on more than a single table. If `TableName` is not available, agents SHOULD also check the `TableArn` or `SourceTableArn` query params for a table name and extract the table name from the AWS ARN value.| |`type`|`db`| |`subtype`|`dynamodb`| |`action`| `query` | | __**context.db._**__ |
|
| |`_.instance`| e.g. `us-east-1` | The AWS region where the table is. | -|`_.statement`| e.g. `ForumName = :name and Subject = :sub` | For a DynamoDB Query operation, capture the KeyConditionExpression in this field. Agents MAY include the full SQL statment for PartiQL-related methods like `executeStatment.| +|`_.statement`| e.g. `ForumName = :name and Subject = :sub` | For a DynamoDB Query operation, capture the KeyConditionExpression in this field. In order to avoid a high cardinality of collected values, agents SHOULD NOT include the full SQL statment for PartiQL-related methods like `executeStatment.| |`_.type`|`dynamodb`| |`_.user`| :heavy_minus_sign: | |`_.link`| :heavy_minus_sign: |