diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 61d4bbad..e67d70b4 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -1753,6 +1753,26 @@ export const DB_COLLECTION_NAME = 'db.collection.name'; */ export type DB_COLLECTION_NAME_TYPE = string; +// Path: model/attributes/db/db__driver__name.json + +/** + * The name of the driver used for the database connection. `db.driver.name` + * + * Attribute Value Type: `string` {@link DB_DRIVER_NAME_TYPE} + * + * Contains PII: false + * + * Attribute defined in OTEL: No + * + * @example "psycopg2" + */ +export const DB_DRIVER_NAME = 'db.driver.name'; + +/** + * Type for {@link DB_DRIVER_NAME} db.driver.name + */ +export type DB_DRIVER_NAME_TYPE = string; + // Path: model/attributes/db/db__name.json /** @@ -9924,6 +9944,7 @@ export const ATTRIBUTE_TYPE: Record = { [CULTURE_LOCALE]: 'string', [CULTURE_TIMEZONE]: 'string', [DB_COLLECTION_NAME]: 'string', + [DB_DRIVER_NAME]: 'string', [DB_NAME]: 'string', [DB_NAMESPACE]: 'string', [DB_OPERATION]: 'string', @@ -10394,6 +10415,7 @@ export type AttributeName = | typeof CULTURE_LOCALE | typeof CULTURE_TIMEZONE | typeof DB_COLLECTION_NAME + | typeof DB_DRIVER_NAME | typeof DB_NAME | typeof DB_NAMESPACE | typeof DB_OPERATION @@ -11851,6 +11873,16 @@ export const ATTRIBUTE_METADATA: Record = { example: 'users', changelog: [{ version: '0.1.0', prs: [106, 127] }, { version: '0.0.0' }], }, + [DB_DRIVER_NAME]: { + brief: 'The name of the driver used for the database connection.', + type: 'string', + pii: { + isPii: 'false', + }, + isInOtel: false, + example: 'psycopg2', + changelog: [{ version: 'next', prs: [297], description: 'Added db.driver.name attribute' }], + }, [DB_NAME]: { brief: 'The name of the database being accessed.', type: 'string', @@ -16508,6 +16540,7 @@ export type Attributes = { [CULTURE_LOCALE]?: CULTURE_LOCALE_TYPE; [CULTURE_TIMEZONE]?: CULTURE_TIMEZONE_TYPE; [DB_COLLECTION_NAME]?: DB_COLLECTION_NAME_TYPE; + [DB_DRIVER_NAME]?: DB_DRIVER_NAME_TYPE; [DB_NAME]?: DB_NAME_TYPE; [DB_NAMESPACE]?: DB_NAMESPACE_TYPE; [DB_OPERATION]?: DB_OPERATION_TYPE; diff --git a/model/attributes/db/db__driver__name.json b/model/attributes/db/db__driver__name.json new file mode 100644 index 00000000..38ca0bf3 --- /dev/null +++ b/model/attributes/db/db__driver__name.json @@ -0,0 +1,17 @@ +{ + "key": "db.driver.name", + "brief": "The name of the driver used for the database connection.", + "type": "string", + "pii": { + "key": "false" + }, + "is_in_otel": false, + "example": "psycopg2", + "changelog": [ + { + "version": "next", + "prs": [297], + "description": "Added db.driver.name attribute" + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index af0a7b3f..02cd88bc 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -1169,6 +1169,16 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "users" """ + # Path: model/attributes/db/db__driver__name.json + DB_DRIVER_NAME: Literal["db.driver.name"] = "db.driver.name" + """The name of the driver used for the database connection. + + Type: str + Contains PII: false + Defined in OTEL: No + Example: "psycopg2" + """ + # Path: model/attributes/db/db__name.json DB_NAME: Literal["db.name"] = "db.name" """The name of the database being accessed. @@ -6450,6 +6460,18 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ChangelogEntry(version="0.0.0"), ], ), + "db.driver.name": AttributeMetadata( + brief="The name of the driver used for the database connection.", + type=AttributeType.STRING, + pii=PiiInfo(isPii=IsPii.FALSE), + is_in_otel=False, + example="psycopg2", + changelog=[ + ChangelogEntry( + version="next", prs=[297], description="Added db.driver.name attribute" + ), + ], + ), "db.name": AttributeMetadata( brief="The name of the database being accessed.", type=AttributeType.STRING, @@ -11073,6 +11095,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "culture.locale": str, "culture.timezone": str, "db.collection.name": str, + "db.driver.name": str, "db.name": str, "db.namespace": str, "db.operation": str,