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
275 changes: 275 additions & 0 deletions javascript/sentry-conventions/src/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1633,6 +1633,52 @@ export const CODE_NAMESPACE = 'code.namespace';
*/
export type CODE_NAMESPACE_TYPE = string;

// Path: model/attributes/connectionType.json

/**
* Specifies the type of the current connection (e.g. wifi, ethernet, cellular , etc). `connectionType`
*
* Attribute Value Type: `string` {@link CONNECTIONTYPE_TYPE}
*
* Contains PII: maybe
*
* Attribute defined in OTEL: No
*
* Aliases: {@link NETWORK_CONNECTION_TYPE} `network.connection.type`
*
* @deprecated Use {@link NETWORK_CONNECTION_TYPE} (network.connection.type) instead - Old namespace-less attribute, to be replaced with network.connection.type for span-first future
* @example "wifi"
*/
export const CONNECTIONTYPE = 'connectionType';

/**
* Type for {@link CONNECTIONTYPE} connectionType
*/
export type CONNECTIONTYPE_TYPE = string;

// Path: model/attributes/connection/connection__rtt.json

/**
* Specifies the estimated effective round-trip time of the current connection, in milliseconds. `connection.rtt`
*
* Attribute Value Type: `number` {@link CONNECTION_RTT_TYPE}
*
* Contains PII: maybe
*
* Attribute defined in OTEL: No
*
* Aliases: {@link NETWORK_CONNECTION_RTT} `network.connection.rtt`
*
* @deprecated Use {@link NETWORK_CONNECTION_RTT} (network.connection.rtt) instead - Old attribute name (no official namespace), to be replaced with network.connection.rtt for span-first future
* @example 100
*/
export const CONNECTION_RTT = 'connection.rtt';

/**
* Type for {@link CONNECTION_RTT} connection.rtt
*/
export type CONNECTION_RTT_TYPE = number;

// Path: model/attributes/culture/culture__calendar.json

/**
Expand Down Expand Up @@ -2183,6 +2229,29 @@ export const DEVICE_MODEL = 'device.model';
*/
export type DEVICE_MODEL_TYPE = string;

// Path: model/attributes/effectiveConnectionType.json

/**
* Specifies the estimated effective type of the current connection (e.g. slow-2g, 2g, 3g, 4g). `effectiveConnectionType`
*
* Attribute Value Type: `string` {@link EFFECTIVECONNECTIONTYPE_TYPE}
*
* Contains PII: maybe
*
* Attribute defined in OTEL: No
*
* Aliases: {@link NETWORK_CONNECTION_EFFECTIVE_TYPE} `network.connection.effective_type`
*
* @deprecated Use {@link NETWORK_CONNECTION_EFFECTIVE_TYPE} (network.connection.effective_type) instead - Old namespace-less attribute, to be replaced with network.connection.effective_type for span-first future
* @example "4g"
*/
export const EFFECTIVECONNECTIONTYPE = 'effectiveConnectionType';

/**
* Type for {@link EFFECTIVECONNECTIONTYPE} effectiveConnectionType
*/
export type EFFECTIVECONNECTIONTYPE_TYPE = string;

// Path: model/attributes/environment.json

/**
Expand Down Expand Up @@ -6007,6 +6076,72 @@ export const NEL_TYPE = 'nel.type';
*/
export type NEL_TYPE_TYPE = string;

// Path: model/attributes/network/network__connection__effective_type.json

/**
* Specifies the effective type of the current connection (e.g. slow-2g, 2g, 3g, 4g). `network.connection.effective_type`
*
* Attribute Value Type: `string` {@link NETWORK_CONNECTION_EFFECTIVE_TYPE_TYPE}
*
* Contains PII: maybe
*
* Attribute defined in OTEL: No
*
* Aliases: {@link EFFECTIVECONNECTIONTYPE} `effectiveConnectionType`
*
* @example "4g"
*/
export const NETWORK_CONNECTION_EFFECTIVE_TYPE = 'network.connection.effective_type';

/**
* Type for {@link NETWORK_CONNECTION_EFFECTIVE_TYPE} network.connection.effective_type
*/
export type NETWORK_CONNECTION_EFFECTIVE_TYPE_TYPE = string;

// Path: model/attributes/network/network__connection__rtt.json

/**
* Specifies the estimated effective round-trip time of the current connection, in milliseconds. `network.connection.rtt`
*
* Attribute Value Type: `number` {@link NETWORK_CONNECTION_RTT_TYPE}
*
* Contains PII: maybe
*
* Attribute defined in OTEL: No
*
* Aliases: {@link CONNECTION_RTT} `connection.rtt`
*
* @example 100
*/
export const NETWORK_CONNECTION_RTT = 'network.connection.rtt';

/**
* Type for {@link NETWORK_CONNECTION_RTT} network.connection.rtt
*/
export type NETWORK_CONNECTION_RTT_TYPE = number;

// Path: model/attributes/network/network__connection__type.json

/**
* Specifies the type of the current connection (e.g. wifi, ethernet, cellular , etc). `network.connection.type`
*
* Attribute Value Type: `string` {@link NETWORK_CONNECTION_TYPE_TYPE}
*
* Contains PII: maybe
*
* Attribute defined in OTEL: Yes
*
* Aliases: {@link CONNECTIONTYPE} `connectionType`
*
* @example "wifi"
*/
export const NETWORK_CONNECTION_TYPE = 'network.connection.type';

/**
* Type for {@link NETWORK_CONNECTION_TYPE} network.connection.type
*/
export type NETWORK_CONNECTION_TYPE_TYPE = string;

// Path: model/attributes/network/network__local__address.json

/**
Expand Down Expand Up @@ -9917,6 +10052,8 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
[CODE_LINENO]: 'integer',
[CODE_LINE_NUMBER]: 'integer',
[CODE_NAMESPACE]: 'string',
[CONNECTIONTYPE]: 'string',
[CONNECTION_RTT]: 'integer',
[CULTURE_CALENDAR]: 'string',
[CULTURE_DISPLAY_NAME]: 'string',
[CULTURE_IS_24_HOUR_FORMAT]: 'boolean',
Expand All @@ -9943,6 +10080,7 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
[DEVICE_FAMILY]: 'string',
[DEVICE_MEMORY_ESTIMATED_CAPACITY]: 'integer',
[DEVICE_MODEL]: 'string',
[EFFECTIVECONNECTIONTYPE]: 'string',
[ENVIRONMENT]: 'string',
[ERROR_TYPE]: 'string',
[EVENT_ID]: 'integer',
Expand Down Expand Up @@ -10126,6 +10264,9 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
[NEL_REFERRER]: 'string',
[NEL_SAMPLING_FUNCTION]: 'double',
[NEL_TYPE]: 'string',
[NETWORK_CONNECTION_EFFECTIVE_TYPE]: 'string',
[NETWORK_CONNECTION_RTT]: 'integer',
[NETWORK_CONNECTION_TYPE]: 'string',
[NETWORK_LOCAL_ADDRESS]: 'string',
[NETWORK_LOCAL_PORT]: 'integer',
[NETWORK_PEER_ADDRESS]: 'string',
Expand Down Expand Up @@ -10387,6 +10528,8 @@ export type AttributeName =
| typeof CODE_LINENO
| typeof CODE_LINE_NUMBER
| typeof CODE_NAMESPACE
| typeof CONNECTIONTYPE
| typeof CONNECTION_RTT
| typeof CULTURE_CALENDAR
| typeof CULTURE_DISPLAY_NAME
| typeof CULTURE_IS_24_HOUR_FORMAT
Expand All @@ -10413,6 +10556,7 @@ export type AttributeName =
| typeof DEVICE_FAMILY
| typeof DEVICE_MEMORY_ESTIMATED_CAPACITY
| typeof DEVICE_MODEL
| typeof EFFECTIVECONNECTIONTYPE
| typeof ENVIRONMENT
| typeof ERROR_TYPE
| typeof EVENT_ID
Expand Down Expand Up @@ -10596,6 +10740,9 @@ export type AttributeName =
| typeof NEL_REFERRER
| typeof NEL_SAMPLING_FUNCTION
| typeof NEL_TYPE
| typeof NETWORK_CONNECTION_EFFECTIVE_TYPE
| typeof NETWORK_CONNECTION_RTT
| typeof NETWORK_CONNECTION_TYPE
| typeof NETWORK_LOCAL_ADDRESS
| typeof NETWORK_LOCAL_PORT
| typeof NETWORK_PEER_ADDRESS
Expand Down Expand Up @@ -11790,6 +11937,51 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
},
changelog: [{ version: '0.1.0', prs: [61, 74] }, { version: '0.0.0' }],
},
[CONNECTIONTYPE]: {
brief: 'Specifies the type of the current connection (e.g. wifi, ethernet, cellular , etc).',
type: 'string',
pii: {
isPii: 'maybe',
},
isInOtel: false,
example: 'wifi',
deprecation: {
replacement: 'network.connection.type',
reason: 'Old namespace-less attribute, to be replaced with network.connection.type for span-first future',
},
aliases: [NETWORK_CONNECTION_TYPE],
sdks: ['javascript-browser'],
changelog: [
{
version: 'next',
prs: [279],
description: "Added and deprecated attribute to document JS SDK's current behaviour",
},
],
},
[CONNECTION_RTT]: {
brief: 'Specifies the estimated effective round-trip time of the current connection, in milliseconds.',
type: 'integer',
pii: {
isPii: 'maybe',
},
isInOtel: false,
example: 100,
deprecation: {
replacement: 'network.connection.rtt',
reason:
'Old attribute name (no official namespace), to be replaced with network.connection.rtt for span-first future',
},
aliases: [NETWORK_CONNECTION_RTT],
sdks: ['javascript-browser'],
changelog: [
{
version: 'next',
prs: [279],
description: "Added and deprecated attribute to document JS SDK's current behaviour",
},
],
},
[CULTURE_CALENDAR]: {
brief: 'The calendar system used by the culture.',
type: 'string',
Expand Down Expand Up @@ -12114,6 +12306,29 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
example: 'iPhone 15 Pro Max',
changelog: [{ version: '0.1.0', prs: [116, 127] }],
},
[EFFECTIVECONNECTIONTYPE]: {
brief: 'Specifies the estimated effective type of the current connection (e.g. slow-2g, 2g, 3g, 4g).',
type: 'string',
pii: {
isPii: 'maybe',
},
isInOtel: false,
example: '4g',
deprecation: {
replacement: 'network.connection.effective_type',
reason:
'Old namespace-less attribute, to be replaced with network.connection.effective_type for span-first future',
},
aliases: [NETWORK_CONNECTION_EFFECTIVE_TYPE],
sdks: ['javascript-browser'],
changelog: [
{
version: 'next',
prs: [279],
description: "Added and deprecated attribute to document JS SDK's current behaviour",
},
],
},
[ENVIRONMENT]: {
brief: 'The sentry environment.',
type: 'string',
Expand Down Expand Up @@ -14383,6 +14598,60 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
example: 'dns.unreachable',
changelog: [{ version: '0.1.0', prs: [68, 127] }],
},
[NETWORK_CONNECTION_EFFECTIVE_TYPE]: {
brief: 'Specifies the effective type of the current connection (e.g. slow-2g, 2g, 3g, 4g).',
type: 'string',
pii: {
isPii: 'maybe',
},
isInOtel: false,
example: '4g',
aliases: [EFFECTIVECONNECTIONTYPE],
sdks: ['javascript-browser'],
changelog: [
{
version: 'next',
prs: [279],
description: 'Added attribute network.connection.effective_type to be used instead of effectiveConnectionType',
},
],
},
[NETWORK_CONNECTION_RTT]: {
brief: 'Specifies the estimated effective round-trip time of the current connection, in milliseconds.',
type: 'integer',
pii: {
isPii: 'maybe',
},
isInOtel: false,
example: 100,
aliases: [CONNECTION_RTT],
sdks: ['javascript-browser'],
changelog: [
{
version: 'next',
prs: [279],
description: 'Added attribute network.connection.rtt to be used instead of connection.rtt',
},
],
},
[NETWORK_CONNECTION_TYPE]: {
brief: 'Specifies the type of the current connection (e.g. wifi, ethernet, cellular , etc).',
type: 'string',
pii: {
isPii: 'maybe',
},
isInOtel: true,
example: 'wifi',
aliases: [CONNECTIONTYPE],
sdks: ['javascript-browser'],
changelog: [
{
version: 'next',
prs: [279],
description: 'Added attribute network.connection.type to be used instead of connectionType',
},
],
},
[NETWORK_LOCAL_ADDRESS]: {
brief: 'Local address of the network connection - IP address or Unix domain socket name.',
type: 'string',
Expand Down Expand Up @@ -16497,6 +16766,8 @@ export type Attributes = {
[CODE_LINENO]?: CODE_LINENO_TYPE;
[CODE_LINE_NUMBER]?: CODE_LINE_NUMBER_TYPE;
[CODE_NAMESPACE]?: CODE_NAMESPACE_TYPE;
[CONNECTIONTYPE]?: CONNECTIONTYPE_TYPE;
[CONNECTION_RTT]?: CONNECTION_RTT_TYPE;
[CULTURE_CALENDAR]?: CULTURE_CALENDAR_TYPE;
[CULTURE_DISPLAY_NAME]?: CULTURE_DISPLAY_NAME_TYPE;
[CULTURE_IS_24_HOUR_FORMAT]?: CULTURE_IS_24_HOUR_FORMAT_TYPE;
Expand All @@ -16523,6 +16794,7 @@ export type Attributes = {
[DEVICE_FAMILY]?: DEVICE_FAMILY_TYPE;
[DEVICE_MEMORY_ESTIMATED_CAPACITY]?: DEVICE_MEMORY_ESTIMATED_CAPACITY_TYPE;
[DEVICE_MODEL]?: DEVICE_MODEL_TYPE;
[EFFECTIVECONNECTIONTYPE]?: EFFECTIVECONNECTIONTYPE_TYPE;
[ENVIRONMENT]?: ENVIRONMENT_TYPE;
[ERROR_TYPE]?: ERROR_TYPE_TYPE;
[EVENT_ID]?: EVENT_ID_TYPE;
Expand Down Expand Up @@ -16706,6 +16978,9 @@ export type Attributes = {
[NEL_REFERRER]?: NEL_REFERRER_TYPE;
[NEL_SAMPLING_FUNCTION]?: NEL_SAMPLING_FUNCTION_TYPE;
[NEL_TYPE]?: NEL_TYPE_TYPE;
[NETWORK_CONNECTION_EFFECTIVE_TYPE]?: NETWORK_CONNECTION_EFFECTIVE_TYPE_TYPE;
[NETWORK_CONNECTION_RTT]?: NETWORK_CONNECTION_RTT_TYPE;
[NETWORK_CONNECTION_TYPE]?: NETWORK_CONNECTION_TYPE_TYPE;
[NETWORK_LOCAL_ADDRESS]?: NETWORK_LOCAL_ADDRESS_TYPE;
[NETWORK_LOCAL_PORT]?: NETWORK_LOCAL_PORT_TYPE;
[NETWORK_PEER_ADDRESS]?: NETWORK_PEER_ADDRESS_TYPE;
Expand Down
Loading
Loading