Skip to content
Open
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
33 changes: 33 additions & 0 deletions javascript/sentry-conventions/src/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down Expand Up @@ -9924,6 +9944,7 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
[CULTURE_LOCALE]: 'string',
[CULTURE_TIMEZONE]: 'string',
[DB_COLLECTION_NAME]: 'string',
[DB_DRIVER_NAME]: 'string',
[DB_NAME]: 'string',
[DB_NAMESPACE]: 'string',
[DB_OPERATION]: 'string',
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -11851,6 +11873,16 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
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',
Expand Down Expand Up @@ -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;
Expand Down
17 changes: 17 additions & 0 deletions model/attributes/db/db__driver__name.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
23 changes: 23 additions & 0 deletions python/src/sentry_conventions/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Loading