diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 32be64ad..daf99f54 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -24246,7 +24246,13 @@ export const ATTRIBUTE_METADATA: Record = { isInOtel: true, visibility: 'public', example: ['Users', 'Cats'], - changelog: [{ version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.table_names attribute' }], + changelog: [ + { version: 'next', description: 'Added additional context on sorting the names' }, + { version: '0.16.0', prs: [479], description: 'Added aws.dynamodb.table_names attribute' }, + ], + additionalContext: [ + 'List each table name once, sorted alphabetically, so the same call gets the same value and span description (`DynamoDB.BatchGetItem Cat, Users`), whatever the order of the tables in the request.', + ], }, 'aws.dynamodb.total_segments': { brief: 'The value of the `TotalSegments` request parameter.', diff --git a/model/attributes/aws/aws__dynamodb__table_names.json b/model/attributes/aws/aws__dynamodb__table_names.json index fb47cf66..a0759825 100644 --- a/model/attributes/aws/aws__dynamodb__table_names.json +++ b/model/attributes/aws/aws__dynamodb__table_names.json @@ -1,6 +1,9 @@ { "key": "aws.dynamodb.table_names", "brief": "The keys in the `RequestItems` object field.", + "additional_context": [ + "List each table name once, sorted alphabetically, so the same call gets the same value and span description (`DynamoDB.BatchGetItem Cat, Users`), whatever the order of the tables in the request." + ], "type": "string[]", "apply_scrubbing": { "key": "manual" @@ -9,6 +12,10 @@ "example": ["Users", "Cats"], "visibility": "public", "changelog": [ + { + "version": "next", + "description": "Added additional context on sorting the names" + }, { "version": "0.16.0", "prs": [479], diff --git a/model/description/db.json b/model/description/db.json index 12e6564a..02127155 100644 --- a/model/description/db.json +++ b/model/description/db.json @@ -16,8 +16,19 @@ "db.redis", "redis" ], - "templates": ["{{db.query.text}}"], - "examples": ["SELECT * FROM users WHERE id = ?"] + "templates": [ + "{{db.query.text}}", + "{{rpc.service}}.{{rpc.method}} {{aws.dynamodb.table_names}}.{{aws.dynamodb.index_name}}", + "{{rpc.service}}.{{rpc.method}} {{aws.dynamodb.table_names}}", + "{{rpc.service}}.{{rpc.method}}" + ], + "examples": [ + "SELECT * FROM users WHERE id = ?", + "DynamoDB.Query orders.by-status", + "DynamoDB.GetItem orders", + "DynamoDB.BatchGetItem customers, orders", + "DynamoDB.ListTables" + ] } ] } diff --git a/model/description/messaging.json b/model/description/messaging.json index a600aa5c..0540037b 100644 --- a/model/description/messaging.json +++ b/model/description/messaging.json @@ -20,8 +20,12 @@ "queue.task.huey", "queue.task.rq" ], - "templates": ["{{messaging.destination.name}}"], - "examples": ["order-events"] + "templates": [ + "{{rpc.service}}.{{rpc.method}} {{messaging.destination.name}}", + "{{messaging.destination.name}}", + "{{rpc.service}}.{{rpc.method}}" + ], + "examples": ["SQS.SendMessageBatch orders", "SNS.Publish alerts", "order-events", "SQS.ReceiveMessage"] } ] } diff --git a/model/description/rpc.json b/model/description/rpc.json new file mode 100644 index 00000000..c5217e6b --- /dev/null +++ b/model/description/rpc.json @@ -0,0 +1,30 @@ +{ + "brief": "RPC", + "operations": [ + { + "name": "RPC call", + "brief": "A remote procedure call, such as an AWS SDK call or a gRPC call.", + "ops": ["rpc"], + "templates": [ + "{{rpc.service}}.{{rpc.method}} {{aws.s3.bucket}}", + "{{rpc.service}}.{{rpc.method}} {{faas.invoked_name}}", + "{{rpc.service}}.{{rpc.method}} {{aws.lambda.target_function.name}}", + "{{rpc.service}}.{{rpc.method}} {{aws.kinesis.stream_name}}", + "{{rpc.service}}.{{rpc.method}} {{aws.step_functions.state_machine.name}}", + "{{rpc.service}}.{{rpc.method}} {{aws.step_functions.activity.name}}", + "{{rpc.service}}.{{rpc.method}} {{aws.secretsmanager.secret.name}}", + "{{rpc.service}}.{{rpc.method}} {{messaging.destination.name}}", + "{{rpc.service}}.{{rpc.method}}" + ], + "examples": [ + "S3.GetBucketPolicy invoices", + "Lambda.UpdateFunctionCode billing", + "Kinesis.PutRecords clicks", + "SFN.StartExecution orders", + "SecretsManager.GetSecretValue db-password", + "SQS.ChangeMessageVisibility orders", + "S3.ListBuckets" + ] + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index ff9b550d..33ab1355 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -14284,12 +14284,19 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): visibility=Visibility.PUBLIC, example=["Users", "Cats"], changelog=[ + ChangelogEntry( + version="next", + description="Added additional context on sorting the names", + ), ChangelogEntry( version="0.16.0", prs=[479], description="Added aws.dynamodb.table_names attribute", ), ], + additional_context=[ + "List each table name once, sorted alphabetically, so the same call gets the same value and span description (`DynamoDB.BatchGetItem Cat, Users`), whatever the order of the tables in the request." + ], ), "aws.dynamodb.total_segments": AttributeMetadata( brief="The value of the `TotalSegments` request parameter.",