Skip to content
Draft
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
93 changes: 85 additions & 8 deletions javascript/sentry-conventions/src/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5556,7 +5556,7 @@ export type DEVICE_CHIPSET_TYPE = string;
// Path: model/attributes/device/device__class.json

/**
* The classification of the device. For example, `low`, `medium`, or `high`. Typically inferred by Relay - SDKs generally do not need to set this directly. `device.class`
* The classification of the device. For example, `1`, `2`, or `3`. Typically inferred by Relay - SDKs generally do not need to set this directly. `device.class`
*
* Attribute Value Type: `string` {@link DEVICE_CLASS_TYPE}
*
Expand All @@ -5565,7 +5565,11 @@ export type DEVICE_CHIPSET_TYPE = string;
* Attribute defined in OTEL: No
* Visibility: public
*
* @example "medium"
* Aliases: {@link SENTRY_DEVICE_CLASS} `sentry.device.class`
*
* @example "1"
* @example "2"
* @example "3"
*/
export const DEVICE_CLASS = 'device.class';

Expand Down Expand Up @@ -14520,6 +14524,32 @@ export const SENTRY_DESCRIPTION = 'sentry.description';
*/
export type SENTRY_DESCRIPTION_TYPE = string;

// Path: model/attributes/sentry/sentry__device__class.json

/**
* The classification of the device. For example, `1`, `2`, or `3`. Typically inferred by Relay - SDKs generally do not need to set this directly. `sentry.device.class`
*
* Attribute Value Type: `string` {@link SENTRY_DEVICE_CLASS_TYPE}
*
* Apply Scrubbing: manual
*
* Attribute defined in OTEL: No
* Visibility: public
*
* Aliases: {@link DEVICE_CLASS} `device.class`
*
* @deprecated Use {@link DEVICE_CLASS} (device.class) instead - Deprecated in favor of device.class
* @example "1"
* @example "2"
* @example "3"
*/
export const SENTRY_DEVICE_CLASS = 'sentry.device.class';

/**
* Type for {@link SENTRY_DEVICE_CLASS} sentry.device.class
*/
export type SENTRY_DEVICE_CLASS_TYPE = string;

// Path: model/attributes/sentry/sentry__dist.json

/**
Expand Down Expand Up @@ -19084,6 +19114,7 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
'sentry.category': 'string',
'sentry.client_sample_rate': 'double',
'sentry.description': 'string',
'sentry.device.class': 'string',
'sentry.dist': 'string',
'sentry.domain': 'string',
'sentry.dsc.environment': 'string',
Expand Down Expand Up @@ -19909,6 +19940,7 @@ export type AttributeName =
| typeof SENTRY_CATEGORY
| typeof SENTRY_CLIENT_SAMPLE_RATE
| typeof SENTRY_DESCRIPTION
| typeof SENTRY_DEVICE_CLASS
| typeof SENTRY_DIST
| typeof SENTRY_DOMAIN
| typeof SENTRY_DSC_ENVIRONMENT
Expand Down Expand Up @@ -23909,16 +23941,28 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
},
'device.class': {
brief:
'The classification of the device. For example, `low`, `medium`, or `high`. Typically inferred by Relay - SDKs generally do not need to set this directly.',
'The classification of the device. For example, `1`, `2`, or `3`. Typically inferred by Relay - SDKs generally do not need to set this directly.',
type: 'string',
keys: ['device.class'],
keys: ['device.class', 'sentry.device.class'],
applyScrubbing: {
key: 'manual',
},
isInOtel: false,
visibility: 'public',
example: 'medium',
changelog: [{ version: '0.5.0', prs: [300], description: 'Added device.class attribute' }],
example: '1',
examples: ['1', '2', '3'],
aliases: ['sentry.device.class'],
changelog: [
{
version: 'next',
prs: [604],
description: 'Added sentry.device.class as a deprecated alias and documented class codes 1/2/3',
},
{ version: '0.5.0', prs: [300], description: 'Added device.class attribute' },
],
additionalContext: [
'The product maps these stringified numeric class codes to `low` (`"1"`), `medium` (`"2"`), and `high` (`"3"`).',
],
},
'device.connection_type': {
brief: 'The internet connection type currently being used by the device.',
Expand Down Expand Up @@ -30379,6 +30423,31 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
example: 'index view query',
changelog: [{ version: '0.1.0', prs: [135] }],
},
'sentry.device.class': {
brief:
'The classification of the device. For example, `1`, `2`, or `3`. Typically inferred by Relay - SDKs generally do not need to set this directly.',
type: 'string',
keys: ['device.class', 'sentry.device.class'],
applyScrubbing: {
key: 'manual',
},
isInOtel: false,
visibility: 'public',
example: '1',
examples: ['1', '2', '3'],
deprecation: {
replacement: 'device.class',
reason: 'Deprecated in favor of device.class',
status: 'backfill',
},
aliases: ['device.class'],
changelog: [
{ version: 'next', prs: [604], description: 'Added and deprecated sentry.device.class in favor of device.class' },
],
additionalContext: [
'The product maps these stringified numeric class codes to `low` (`"1"`), `medium` (`"2"`), and `high` (`"3"`).',
],
},
'sentry.dist': {
brief: 'The sentry dist.',
type: 'string',
Expand Down Expand Up @@ -34533,8 +34602,8 @@ export const ATTRIBUTE_SEARCH_METADATA: Record<string, AttributeSearchMetadata>
canonicalName: 'device.class',
type: 'string',
brief:
'The classification of the device. For example, `low`, `medium`, or `high`. Typically inferred by Relay - SDKs generally do not need to set this directly.',
deprecationChain: ['device.class'],
'The classification of the device. For example, `1`, `2`, or `3`. Typically inferred by Relay - SDKs generally do not need to set this directly.',
deprecationChain: ['device.class', 'sentry.device.class'],
},
'device.connection_type': {
canonicalName: 'network.connection.type',
Expand Down Expand Up @@ -37135,6 +37204,13 @@ export const ATTRIBUTE_SEARCH_METADATA: Record<string, AttributeSearchMetadata>
brief: 'The human-readable description of a span.',
deprecationChain: ['sentry.description'],
},
'sentry.device.class': {
canonicalName: 'device.class',
type: 'string',
brief:
'The classification of the device. For example, `1`, `2`, or `3`. Typically inferred by Relay - SDKs generally do not need to set this directly.',
deprecationChain: ['device.class', 'sentry.device.class'],
},
'sentry.dist': {
canonicalName: 'sentry.dist',
type: 'string',
Expand Down Expand Up @@ -38803,6 +38879,7 @@ export type Attributes = {
[SENTRY_CATEGORY]?: SENTRY_CATEGORY_TYPE;
[SENTRY_CLIENT_SAMPLE_RATE]?: SENTRY_CLIENT_SAMPLE_RATE_TYPE;
[SENTRY_DESCRIPTION]?: SENTRY_DESCRIPTION_TYPE;
[SENTRY_DEVICE_CLASS]?: SENTRY_DEVICE_CLASS_TYPE;
[SENTRY_DIST]?: SENTRY_DIST_TYPE;
[SENTRY_DOMAIN]?: SENTRY_DOMAIN_TYPE;
[SENTRY_DSC_ENVIRONMENT]?: SENTRY_DSC_ENVIRONMENT_TYPE;
Expand Down
13 changes: 11 additions & 2 deletions model/attributes/device/device__class.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
{
"key": "device.class",
"brief": "The classification of the device. For example, `low`, `medium`, or `high`. Typically inferred by Relay - SDKs generally do not need to set this directly.",
"brief": "The classification of the device. For example, `1`, `2`, or `3`. Typically inferred by Relay - SDKs generally do not need to set this directly.",
"type": "string",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"example": "medium",
"examples": ["1", "2", "3"],
"additional_context": [
"The product maps these stringified numeric class codes to `low` (`\"1\"`), `medium` (`\"2\"`), and `high` (`\"3\"`)."
],
"alias": ["sentry.device.class"],
"visibility": "public",
"changelog": [
{
"version": "next",
"prs": [604],
"description": "Added sentry.device.class as a deprecated alias and documented class codes 1/2/3"
},
{
"version": "0.5.0",
"prs": [300],
Expand Down
27 changes: 27 additions & 0 deletions model/attributes/sentry/sentry__device__class.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"key": "sentry.device.class",
"brief": "The classification of the device. For example, `1`, `2`, or `3`. Typically inferred by Relay - SDKs generally do not need to set this directly.",
"type": "string",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"examples": ["1", "2", "3"],
"additional_context": [
"The product maps these stringified numeric class codes to `low` (`\"1\"`), `medium` (`\"2\"`), and `high` (`\"3\"`)."
],
"alias": ["device.class"],
"deprecation": {
"replacement": "device.class",
"reason": "Deprecated in favor of device.class",
"_status": "backfill"
},
"visibility": "public",
"changelog": [
{
"version": "next",
"prs": [604],
"description": "Added and deprecated sentry.device.class in favor of device.class"
}
]
}
72 changes: 67 additions & 5 deletions python/src/sentry_conventions/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ class _AttributeNamesMeta(type):
"RUNTIME_VERSION",
"SENTRY_BROWSER_NAME",
"SENTRY_BROWSER_VERSION",
"SENTRY_DEVICE_CLASS",
"SENTRY_FRAMES_FROZEN",
"SENTRY_FRAMES_SLOW",
"SENTRY_FRAMES_TOTAL",
Expand Down Expand Up @@ -3526,13 +3527,16 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):

# Path: model/attributes/device/device__class.json
DEVICE_CLASS: Literal["device.class"] = "device.class"
"""The classification of the device. For example, `low`, `medium`, or `high`. Typically inferred by Relay - SDKs generally do not need to set this directly.
"""The classification of the device. For example, `1`, `2`, or `3`. Typically inferred by Relay - SDKs generally do not need to set this directly.

Type: str
Apply Scrubbing: manual
Defined in OTEL: No
Visibility: public
Example: "medium"
Aliases: sentry.device.class
Example: "1"
Example: "2"
Example: "3"
"""

# Path: model/attributes/device/device__connection_type.json
Expand Down Expand Up @@ -8553,6 +8557,21 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
Example: "index view query"
"""

# Path: model/attributes/sentry/sentry__device__class.json
SENTRY_DEVICE_CLASS: Literal["sentry.device.class"] = "sentry.device.class"
"""The classification of the device. For example, `1`, `2`, or `3`. Typically inferred by Relay - SDKs generally do not need to set this directly.

Type: str
Apply Scrubbing: manual
Defined in OTEL: No
Visibility: public
Aliases: device.class
DEPRECATED: Use device.class instead - Deprecated in favor of device.class
Example: "1"
Example: "2"
Example: "3"
"""

# Path: model/attributes/sentry/sentry__dist.json
SENTRY_DIST: Literal["sentry.dist"] = "sentry.dist"
"""The sentry dist.
Expand Down Expand Up @@ -15251,18 +15270,31 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
],
),
"device.class": AttributeMetadata(
brief="The classification of the device. For example, `low`, `medium`, or `high`. Typically inferred by Relay - SDKs generally do not need to set this directly.",
brief="The classification of the device. For example, `1`, `2`, or `3`. Typically inferred by Relay - SDKs generally do not need to set this directly.",
type=AttributeType.STRING,
keys=("device.class",),
keys=(
"device.class",
"sentry.device.class",
),
apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL),
is_in_otel=False,
visibility=Visibility.PUBLIC,
example="medium",
example="1",
examples=["1", "2", "3"],
aliases=["sentry.device.class"],
changelog=[
ChangelogEntry(
version="next",
prs=[604],
description="Added sentry.device.class as a deprecated alias and documented class codes 1/2/3",
),
ChangelogEntry(
version="0.5.0", prs=[300], description="Added device.class attribute"
),
],
additional_context=[
'The product maps these stringified numeric class codes to `low` (`"1"`), `medium` (`"2"`), and `high` (`"3"`).'
],
),
"device.connection_type": AttributeMetadata(
brief="The internet connection type currently being used by the device.",
Expand Down Expand Up @@ -22797,6 +22829,35 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
ChangelogEntry(version="0.1.0", prs=[135]),
],
),
"sentry.device.class": AttributeMetadata(
brief="The classification of the device. For example, `1`, `2`, or `3`. Typically inferred by Relay - SDKs generally do not need to set this directly.",
type=AttributeType.STRING,
keys=(
"device.class",
"sentry.device.class",
),
apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL),
is_in_otel=False,
visibility=Visibility.PUBLIC,
example="1",
examples=["1", "2", "3"],
deprecation=DeprecationInfo(
replacement="device.class",
reason="Deprecated in favor of device.class",
status=DeprecationStatus.BACKFILL,
),
aliases=["device.class"],
changelog=[
ChangelogEntry(
version="next",
prs=[604],
description="Added and deprecated sentry.device.class in favor of device.class",
),
],
additional_context=[
'The product maps these stringified numeric class codes to `low` (`"1"`), `medium` (`"2"`), and `high` (`"3"`).'
],
),
"sentry.dist": AttributeMetadata(
brief="The sentry dist.",
type=AttributeType.STRING,
Expand Down Expand Up @@ -26295,6 +26356,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
"sentry.category": str,
"sentry.client_sample_rate": float,
"sentry.description": str,
"sentry.device.class": str,
"sentry.dist": str,
"sentry.domain": str,
"sentry.dsc.environment": str,
Expand Down
Loading