Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
54 changes: 49 additions & 5 deletions javascript/sentry-conventions/src/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4180,6 +4180,30 @@ export const CLS_SOURCE_KEY_BASE = 'cls.source';
*/
export type CLS_SOURCE_KEY_TYPE = string;

// Path: model/attributes/code.json

/**
* Status code of the RPC returned by the RPC server or generated by the client. `code`
*
* Attribute Value Type: `string` {@link CODE_TYPE}
*
* Apply Scrubbing: manual
*
* Attribute defined in OTEL: No
* Visibility: public
*
* Aliases: {@link RPC_GRPC_STATUS_CODE} `rpc.grpc.status_code`, {@link RPC_RESPONSE_STATUS_CODE} `rpc.response.status_code`
*
* @deprecated Use {@link RPC_RESPONSE_STATUS_CODE} (rpc.response.status_code) instead
* @example "DEADLINE_EXCEEDED"
*/
export const CODE = 'code';

/**
* Type for {@link CODE} code
*/
export type CODE_TYPE = string;

// Path: model/attributes/code/code__filepath.json

/**
Expand Down Expand Up @@ -13137,7 +13161,7 @@ export type ROUTE_TYPE = string;
* Attribute defined in OTEL: Yes
* Visibility: public
*
* Aliases: {@link RPC_RESPONSE_STATUS_CODE} `rpc.response.status_code`
* Aliases: {@link CODE} `code`, {@link RPC_RESPONSE_STATUS_CODE} `rpc.response.status_code`
*
* @deprecated Use {@link RPC_RESPONSE_STATUS_CODE} (rpc.response.status_code) instead - Cannot be automatically backfilled due to type mismatch (integer vs string); rpc.grpc.status_code is a numeric gRPC status code while rpc.response.status_code is the string status name.
* @example 2
Expand Down Expand Up @@ -13182,7 +13206,7 @@ export type RPC_METHOD_TYPE = string;
* Attribute defined in OTEL: Yes
* Visibility: public
*
* Aliases: {@link RPC_GRPC_STATUS_CODE} `rpc.grpc.status_code`
* Aliases: {@link CODE} `code`, {@link RPC_GRPC_STATUS_CODE} `rpc.grpc.status_code`
*
* @example "DEADLINE_EXCEEDED"
*/
Expand Down Expand Up @@ -17566,6 +17590,7 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
'cloud.resource_id': 'string',
cls: 'double',
'cls.source.<key>': 'string',
code: 'string',
'code.filepath': 'string',
'code.file.path': 'string',
'code.function': 'string',
Expand Down Expand Up @@ -18348,6 +18373,7 @@ export type AttributeName =
| typeof CLOUD_RESOURCE_ID
| typeof CLS
| typeof CLS_SOURCE_KEY
| typeof CODE
| typeof CODE_FILEPATH
| typeof CODE_FILE_PATH
| typeof CODE_FUNCTION
Expand Down Expand Up @@ -21525,6 +21551,23 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
aliases: ['browser.web_vital.cls.source.<key>'],
changelog: [{ version: '0.5.0', prs: [234] }],
},
code: {
brief: 'Status code of the RPC returned by the RPC server or generated by the client.',
type: 'string',
applyScrubbing: {
key: 'manual',
},
isInOtel: false,
visibility: 'public',
example: 'DEADLINE_EXCEEDED',
examples: ['DEADLINE_EXCEEDED'],
deprecation: {
replacement: 'rpc.response.status_code',
status: 'backfill',
},
aliases: ['rpc.grpc.status_code', 'rpc.response.status_code'],
changelog: [{ version: 'next', prs: [533], description: 'Added code attribute' }],
},
'code.filepath': {
brief:
'The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).',
Expand Down Expand Up @@ -27271,7 +27314,7 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
reason:
'Cannot be automatically backfilled due to type mismatch (integer vs string); rpc.grpc.status_code is a numeric gRPC status code while rpc.response.status_code is the string status name.',
},
aliases: ['rpc.response.status_code'],
aliases: ['code', 'rpc.response.status_code'],
changelog: [
{ version: 'next', description: 'Deprecated rpc.grpc.status_code in favor of rpc.response.status_code' },
{ version: '0.4.0', prs: [228] },
Expand All @@ -27298,9 +27341,9 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
isInOtel: true,
visibility: 'public',
example: 'DEADLINE_EXCEEDED',
aliases: ['rpc.grpc.status_code'],
aliases: ['code', 'rpc.grpc.status_code'],
changelog: [
{ version: 'next', description: 'Added rpc.grpc.status_code as an alias' },
{ version: 'next', description: 'Added code and rpc.grpc.status_code as aliases' },
{ version: '0.7.0', prs: [352], description: 'Added rpc.response.status_code attribute' },
],
},
Expand Down Expand Up @@ -29944,6 +29987,7 @@ export type Attributes = {
[CLOUD_RESOURCE_ID]?: CLOUD_RESOURCE_ID_TYPE;
[CLS]?: CLS_TYPE;
[CLS_SOURCE_KEY]?: CLS_SOURCE_KEY_TYPE;
[CODE]?: CODE_TYPE;
[CODE_FILEPATH]?: CODE_FILEPATH_TYPE;
[CODE_FILE_PATH]?: CODE_FILE_PATH_TYPE;
[CODE_FUNCTION]?: CODE_FUNCTION_TYPE;
Expand Down
23 changes: 23 additions & 0 deletions model/attributes/code.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"key": "code",
"brief": "Status code of the RPC returned by the RPC server or generated by the client.",
"type": "string",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"visibility": "public",
"examples": ["DEADLINE_EXCEEDED"],
"alias": ["rpc.grpc.status_code", "rpc.response.status_code"],
Comment thread
alexander-alderman-webb marked this conversation as resolved.
"deprecation": {
"_status": "backfill",
"replacement": "rpc.response.status_code"
},
Comment thread
cursor[bot] marked this conversation as resolved.
"changelog": [
{
"version": "next",
"prs": [533],
"description": "Added code attribute"
}
]
}
Comment thread
sentry[bot] marked this conversation as resolved.
2 changes: 1 addition & 1 deletion model/attributes/rpc/rpc__grpc__status_code.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"is_in_otel": true,
"example": 2,
"alias": ["rpc.response.status_code"],
"alias": ["code", "rpc.response.status_code"],
"deprecation": {
"_status": null,
"replacement": "rpc.response.status_code",
Expand Down
4 changes: 2 additions & 2 deletions model/attributes/rpc/rpc__response__status_code.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
},
"is_in_otel": true,
"example": "DEADLINE_EXCEEDED",
"alias": ["rpc.grpc.status_code"],
"alias": ["code", "rpc.grpc.status_code"],
"visibility": "public",
"changelog": [
{
"version": "next",
"description": "Added rpc.grpc.status_code as an alias"
"description": "Added code and rpc.grpc.status_code as aliases"
},
{
"version": "0.7.0",
Expand Down
44 changes: 39 additions & 5 deletions python/src/sentry_conventions/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ class _AttributeNamesMeta(type):
"CLS",
"CODE_FILEPATH",
"CODE_LINENO",
"CODE",
"CONNECTION_RTT",
"CONNECTIONTYPE",
"DB_MONGODB_COLLECTION",
Expand Down Expand Up @@ -2808,6 +2809,19 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
Example: "http.handler"
"""

# Path: model/attributes/code.json
CODE: Literal["code"] = "code"
"""Status code of the RPC returned by the RPC server or generated by the client.

Type: str
Apply Scrubbing: manual
Defined in OTEL: No
Visibility: public
Aliases: rpc.grpc.status_code, rpc.response.status_code
DEPRECATED: Use rpc.response.status_code instead
Example: "DEADLINE_EXCEEDED"
"""

# Path: model/attributes/connection/connection__rtt.json
CONNECTION_RTT: Literal["connection.rtt"] = "connection.rtt"
"""Specifies the estimated effective round-trip time of the current connection, in milliseconds.
Expand Down Expand Up @@ -7718,7 +7732,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
Apply Scrubbing: manual
Defined in OTEL: Yes
Visibility: public
Aliases: rpc.response.status_code
Aliases: code, rpc.response.status_code
DEPRECATED: Use rpc.response.status_code instead - Cannot be automatically backfilled due to type mismatch (integer vs string); rpc.grpc.status_code is a numeric gRPC status code while rpc.response.status_code is the string status name.
Example: 2
"""
Expand All @@ -7744,7 +7758,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
Apply Scrubbing: manual
Defined in OTEL: Yes
Visibility: public
Aliases: rpc.grpc.status_code
Aliases: code, rpc.grpc.status_code
Example: "DEADLINE_EXCEEDED"
"""

Expand Down Expand Up @@ -12994,6 +13008,24 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
ChangelogEntry(version="0.0.0"),
],
),
"code": AttributeMetadata(
brief="Status code of the RPC returned by the RPC server or generated by the client.",
type=AttributeType.STRING,
apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL),
is_in_otel=False,
visibility=Visibility.PUBLIC,
example="DEADLINE_EXCEEDED",
examples=["DEADLINE_EXCEEDED"],
deprecation=DeprecationInfo(
replacement="rpc.response.status_code", status=DeprecationStatus.BACKFILL
),
aliases=["rpc.grpc.status_code", "rpc.response.status_code"],
changelog=[
ChangelogEntry(
version="next", prs=[533], description="Added code attribute"
),
],
),
"connection.rtt": AttributeMetadata(
brief="Specifies the estimated effective round-trip time of the current connection, in milliseconds.",
type=AttributeType.INTEGER,
Expand Down Expand Up @@ -18993,7 +19025,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
replacement="rpc.response.status_code",
reason="Cannot be automatically backfilled due to type mismatch (integer vs string); rpc.grpc.status_code is a numeric gRPC status code while rpc.response.status_code is the string status name.",
),
aliases=["rpc.response.status_code"],
aliases=["code", "rpc.response.status_code"],
changelog=[
ChangelogEntry(
version="next",
Expand Down Expand Up @@ -19023,10 +19055,11 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
is_in_otel=True,
visibility=Visibility.PUBLIC,
example="DEADLINE_EXCEEDED",
aliases=["rpc.grpc.status_code"],
aliases=["code", "rpc.grpc.status_code"],
changelog=[
ChangelogEntry(
version="next", description="Added rpc.grpc.status_code as an alias"
version="next",
description="Added code and rpc.grpc.status_code as aliases",
),
ChangelogEntry(
version="0.7.0",
Expand Down Expand Up @@ -21785,6 +21818,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
"code.line.number": int,
"code.lineno": int,
"code.namespace": str,
"code": str,
"connection.rtt": int,
"connectionType": str,
"culture.calendar": str,
Expand Down
Loading