diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 28656ed3..8036315b 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -16329,6 +16329,7 @@ export type RPC_GRPC_STATUS_CODE_TYPE = number; * Aliases: {@link AWS_OPERATION_NAME} `aws.operation_name` * * @example "com.example.ExampleService/exampleMethod" + * @example "GetObject" */ export const RPC_METHOD = 'rpc.method'; @@ -16373,6 +16374,8 @@ export type RPC_RESPONSE_STATUS_CODE_TYPE = string; * Visibility: public * * @example "myService.BestService" + * @example "S3" + * @example "APIGateway" */ export const RPC_SERVICE = 'rpc.service'; @@ -35347,11 +35350,14 @@ export const ATTRIBUTE_METADATA: Record = { isInOtel: true, visibility: 'public', example: 'com.example.ExampleService/exampleMethod', + examples: ['com.example.ExampleService/exampleMethod', 'GetObject'], aliases: ['aws.operation_name'], changelog: [ + { version: 'next', description: 'Added AWS SDK example and additional context' }, { version: '0.19.0', prs: [536], description: 'Added aws.operation_name as an alias' }, { version: '0.7.0', prs: [351], description: 'Added rpc.method attribute' }, ], + additionalContext: ['For AWS SDK calls, this is the operation name only, as the SDK reports it, e.g. `GetObject`.'], }, 'rpc.response.status_code': { brief: 'Status code of the RPC returned by the RPC server or generated by the client.', @@ -35379,14 +35385,16 @@ export const ATTRIBUTE_METADATA: Record = { isInOtel: true, visibility: 'public', example: 'myService.BestService', + examples: ['myService.BestService', 'S3', 'APIGateway'], changelog: [ + { version: 'next', description: 'Added AWS SDK examples' }, { version: '0.28.0', prs: [714], description: 'Added additional context about the OpenTelemetry deprecation' }, { version: '0.1.0', prs: [127] }, { version: '0.0.0' }, ], additionalContext: [ 'Deprecated in OpenTelemetry for generic RPC spans. The value should be included in `rpc.method`, which is expected to be the fully-qualified name.', - 'Still set on AWS SDK spans, where it holds the AWS service (e.g. `S3`) and `rpc.method` is set to the operation (e.g. `GetObject`).', + 'Still set on AWS SDK spans, where it holds the AWS service ID with all whitespace removed (e.g. `S3`, `APIGateway` for `API Gateway`) and `rpc.method` is set to the operation (e.g. `GetObject`).', ], }, 'rpc.system': { diff --git a/model/attributes/rpc/rpc__method.json b/model/attributes/rpc/rpc__method.json index 788843c9..5b867fec 100644 --- a/model/attributes/rpc/rpc__method.json +++ b/model/attributes/rpc/rpc__method.json @@ -1,15 +1,22 @@ { "key": "rpc.method", "brief": "The fully-qualified logical name of the method from the RPC interface perspective.", + "additional_context": [ + "For AWS SDK calls, this is the operation name only, as the SDK reports it, e.g. `GetObject`." + ], "type": "string", "apply_scrubbing": { "key": "manual" }, "is_in_otel": true, - "example": "com.example.ExampleService/exampleMethod", + "examples": ["com.example.ExampleService/exampleMethod", "GetObject"], "visibility": "public", "alias": ["aws.operation_name"], "changelog": [ + { + "version": "next", + "description": "Added AWS SDK example and additional context" + }, { "version": "0.19.0", "prs": [536], diff --git a/model/attributes/rpc/rpc__service.json b/model/attributes/rpc/rpc__service.json index 9b01ab37..e3b58fa2 100644 --- a/model/attributes/rpc/rpc__service.json +++ b/model/attributes/rpc/rpc__service.json @@ -7,12 +7,16 @@ }, "additional_context": [ "Deprecated in OpenTelemetry for generic RPC spans. The value should be included in `rpc.method`, which is expected to be the fully-qualified name.", - "Still set on AWS SDK spans, where it holds the AWS service (e.g. `S3`) and `rpc.method` is set to the operation (e.g. `GetObject`)." + "Still set on AWS SDK spans, where it holds the AWS service ID with all whitespace removed (e.g. `S3`, `APIGateway` for `API Gateway`) and `rpc.method` is set to the operation (e.g. `GetObject`)." ], "is_in_otel": true, - "example": "myService.BestService", + "examples": ["myService.BestService", "S3", "APIGateway"], "visibility": "public", "changelog": [ + { + "version": "next", + "description": "Added AWS SDK examples" + }, { "version": "0.28.0", "prs": [714], diff --git a/model/description/object.json b/model/description/object.json new file mode 100644 index 00000000..a1b550dc --- /dev/null +++ b/model/description/object.json @@ -0,0 +1,26 @@ +{ + "brief": "Object storage", + "operations": [ + { + "name": "Object", + "brief": "An operation on an object storage system such as Cloudflare R2, Amazon S3, and compatible services.", + "ops": [ + "object.get", + "object.head", + "object.put", + "object.copy", + "object.delete", + "object.list", + "object.upload_part", + "object.multipart_upload.abort", + "object.multipart_upload.create", + "object.multipart_upload.complete" + ], + "templates": [ + "{{rpc.service}}.{{rpc.method}} {{aws.s3.bucket}}", + "R2.{{cloudflare.r2.operation}} {{cloudflare.r2.bucket}}" + ], + "examples": ["S3.GetObject invoices", "S3.DeleteObjects invoices", "R2.GetObject MY_BUCKET"] + } + ] +} diff --git a/model/name/object.json b/model/name/object.json new file mode 100644 index 00000000..34a34518 --- /dev/null +++ b/model/name/object.json @@ -0,0 +1,25 @@ +{ + "brief": "Object storage", + "operations": [ + { + "name": "Object", + "brief": "An operation on an object storage system such as Amazon S3, Cloudflare R2, and compatible services.", + "is_in_otel": true, + "otel_notes": "OpenTelemetry has no Object Storage conventions. It names S3 calls like any other AWS SDK span, `{rpc.service}.{rpc.method}`, which the first template matches.", + "ops": [ + "object.get", + "object.head", + "object.put", + "object.copy", + "object.delete", + "object.list", + "object.upload_part", + "object.multipart_upload.abort", + "object.multipart_upload.create", + "object.multipart_upload.complete" + ], + "templates": ["{{rpc.service}}.{{rpc.method}}", "R2.{{cloudflare.r2.operation}}", "Object storage operation"], + "examples": ["S3.GetObject", "R2.GetObject", "Object storage operation"] + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index f021e531..3d914ba0 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -9729,6 +9729,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Visibility: public Aliases: aws.operation_name Example: "com.example.ExampleService/exampleMethod" + Example: "GetObject" """ # Path: model/attributes/rpc/rpc__response__status_code.json @@ -9754,6 +9755,8 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Defined in OTEL: Yes Visibility: public Example: "myService.BestService" + Example: "S3" + Example: "APIGateway" """ # Path: model/attributes/rpc/rpc__system.json @@ -26739,8 +26742,13 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): is_in_otel=True, visibility=Visibility.PUBLIC, example="com.example.ExampleService/exampleMethod", + examples=["com.example.ExampleService/exampleMethod", "GetObject"], aliases=["aws.operation_name"], changelog=[ + ChangelogEntry( + version="next", + description="Added AWS SDK example and additional context", + ), ChangelogEntry( version="0.19.0", prs=[536], @@ -26750,6 +26758,9 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): version="0.7.0", prs=[351], description="Added rpc.method attribute" ), ], + additional_context=[ + "For AWS SDK calls, this is the operation name only, as the SDK reports it, e.g. `GetObject`." + ], ), "rpc.response.status_code": AttributeMetadata( brief="Status code of the RPC returned by the RPC server or generated by the client.", @@ -26784,7 +26795,9 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): is_in_otel=True, visibility=Visibility.PUBLIC, example="myService.BestService", + examples=["myService.BestService", "S3", "APIGateway"], changelog=[ + ChangelogEntry(version="next", description="Added AWS SDK examples"), ChangelogEntry( version="0.28.0", prs=[714], @@ -26795,7 +26808,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ], additional_context=[ "Deprecated in OpenTelemetry for generic RPC spans. The value should be included in `rpc.method`, which is expected to be the fully-qualified name.", - "Still set on AWS SDK spans, where it holds the AWS service (e.g. `S3`) and `rpc.method` is set to the operation (e.g. `GetObject`).", + "Still set on AWS SDK spans, where it holds the AWS service ID with all whitespace removed (e.g. `S3`, `APIGateway` for `API Gateway`) and `rpc.method` is set to the operation (e.g. `GetObject`).", ], ), "rpc.system": AttributeMetadata(