diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 3a4b2b80..52e0e44f 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -5193,6 +5193,48 @@ export const FCP = 'fcp'; */ export type FCP_TYPE = number; +// Path: model/attributes/file/file__path.json + +/** + * Path to the file. `file.path` + * + * Attribute Value Type: `string` {@link FILE_PATH_TYPE} + * + * Apply Scrubbing: auto - File paths can contain end-user paths (e.g. from stack traces) that may be sensitive. + * + * Attribute defined in OTEL: Yes + * Visibility: public + * + * @example "/home/user/example.txt" + */ +export const FILE_PATH = 'file.path'; + +/** + * Type for {@link FILE_PATH} file.path + */ +export type FILE_PATH_TYPE = string; + +// Path: model/attributes/file/file__size.json + +/** + * File size in bytes. `file.size` + * + * Attribute Value Type: `number` {@link FILE_SIZE_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: Yes + * Visibility: public + * + * @example 1024 + */ +export const FILE_SIZE = 'file.size'; + +/** + * Type for {@link FILE_SIZE} file.size + */ +export type FILE_SIZE_TYPE = number; + // Path: model/attributes/flag/flag__evaluation__[key].json /** @@ -15058,6 +15100,8 @@ export const ATTRIBUTE_TYPE: Record = { 'faas.trigger': 'string', 'faas.version': 'string', fcp: 'double', + 'file.path': 'string', + 'file.size': 'integer', 'flag.evaluation.': 'boolean', fp: 'double', 'frames.delay': 'integer', @@ -15732,6 +15776,8 @@ export type AttributeName = | typeof FAAS_TRIGGER | typeof FAAS_VERSION | typeof FCP + | typeof FILE_PATH + | typeof FILE_SIZE | typeof FLAG_EVALUATION_KEY | typeof FP | typeof FRAMES_DELAY @@ -19260,6 +19306,29 @@ export const ATTRIBUTE_METADATA: Record = { aliases: ['browser.web_vital.fcp.value'], changelog: [{ version: '0.5.0', prs: [235] }], }, + 'file.path': { + brief: 'Path to the file.', + type: 'string', + applyScrubbing: { + key: 'auto', + reason: 'File paths can contain end-user paths (e.g. from stack traces) that may be sensitive.', + }, + isInOtel: true, + visibility: 'public', + example: '/home/user/example.txt', + changelog: [{ version: 'next', prs: [458], description: 'Added file.path attribute' }], + }, + 'file.size': { + brief: 'File size in bytes.', + type: 'integer', + applyScrubbing: { + key: 'manual', + }, + isInOtel: true, + visibility: 'public', + example: 1024, + changelog: [{ version: 'next', prs: [458], description: 'Added file.size attribute' }], + }, 'flag.evaluation.': { brief: 'An instance of a feature flag evaluation. The value of this attribute is the boolean representing the evaluation result. The suffix is the name of the feature flag.', @@ -25301,6 +25370,8 @@ export type Attributes = { [FAAS_TRIGGER]?: FAAS_TRIGGER_TYPE; [FAAS_VERSION]?: FAAS_VERSION_TYPE; [FCP]?: FCP_TYPE; + [FILE_PATH]?: FILE_PATH_TYPE; + [FILE_SIZE]?: FILE_SIZE_TYPE; [FLAG_EVALUATION_KEY]?: FLAG_EVALUATION_KEY_TYPE; [FP]?: FP_TYPE; [FRAMES_DELAY]?: FRAMES_DELAY_TYPE; diff --git a/model/attributes/file/file__path.json b/model/attributes/file/file__path.json new file mode 100644 index 00000000..2df68448 --- /dev/null +++ b/model/attributes/file/file__path.json @@ -0,0 +1,19 @@ +{ + "key": "file.path", + "brief": "Path to the file.", + "type": "string", + "apply_scrubbing": { + "key": "auto", + "reason": "File paths can contain end-user paths (e.g. from stack traces) that may be sensitive." + }, + "is_in_otel": true, + "visibility": "public", + "example": "/home/user/example.txt", + "changelog": [ + { + "version": "next", + "prs": [458], + "description": "Added file.path attribute" + } + ] +} diff --git a/model/attributes/file/file__size.json b/model/attributes/file/file__size.json new file mode 100644 index 00000000..3e088d97 --- /dev/null +++ b/model/attributes/file/file__size.json @@ -0,0 +1,18 @@ +{ + "key": "file.size", + "brief": "File size in bytes.", + "type": "integer", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": true, + "visibility": "public", + "example": 1024, + "changelog": [ + { + "version": "next", + "prs": [458], + "description": "Added file.size attribute" + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index f8ca9a0b..4a80f709 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -3179,6 +3179,28 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: 547.6951 """ + # Path: model/attributes/file/file__path.json + FILE_PATH: Literal["file.path"] = "file.path" + """Path to the file. + + Type: str + Apply Scrubbing: auto - File paths can contain end-user paths (e.g. from stack traces) that may be sensitive. + Defined in OTEL: Yes + Visibility: public + Example: "/home/user/example.txt" + """ + + # Path: model/attributes/file/file__size.json + FILE_SIZE: Literal["file.size"] = "file.size" + """File size in bytes. + + Type: int + Apply Scrubbing: manual + Defined in OTEL: Yes + Visibility: public + Example: 1024 + """ + # Path: model/attributes/flag/flag__evaluation__[key].json FLAG_EVALUATION_KEY: Literal["flag.evaluation."] = "flag.evaluation." """An instance of a feature flag evaluation. The value of this attribute is the boolean representing the evaluation result. The suffix is the name of the feature flag. @@ -11925,6 +11947,35 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ChangelogEntry(version="0.5.0", prs=[235]), ], ), + "file.path": AttributeMetadata( + brief="Path to the file.", + type=AttributeType.STRING, + apply_scrubbing=ApplyScrubbingInfo( + key=ApplyScrubbing.AUTO, + reason="File paths can contain end-user paths (e.g. from stack traces) that may be sensitive.", + ), + is_in_otel=True, + visibility=Visibility.PUBLIC, + example="/home/user/example.txt", + changelog=[ + ChangelogEntry( + version="next", prs=[458], description="Added file.path attribute" + ), + ], + ), + "file.size": AttributeMetadata( + brief="File size in bytes.", + type=AttributeType.INTEGER, + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=True, + visibility=Visibility.PUBLIC, + example=1024, + changelog=[ + ChangelogEntry( + version="next", prs=[458], description="Added file.size attribute" + ), + ], + ), "flag.evaluation.": AttributeMetadata( brief="An instance of a feature flag evaluation. The value of this attribute is the boolean representing the evaluation result. The suffix is the name of the feature flag.", type=AttributeType.BOOLEAN, @@ -18221,6 +18272,8 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "faas.trigger": str, "faas.version": str, "fcp": float, + "file.path": str, + "file.size": int, "flag.evaluation.": bool, "fp": float, "frames.delay": int,