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

/**
Expand Down Expand Up @@ -15058,6 +15100,8 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
'faas.trigger': 'string',
'faas.version': 'string',
fcp: 'double',
'file.path': 'string',
'file.size': 'integer',
'flag.evaluation.<key>': 'boolean',
fp: 'double',
'frames.delay': 'integer',
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -19260,6 +19306,29 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
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.<key>': {
brief:
'An instance of a feature flag evaluation. The value of this attribute is the boolean representing the evaluation result. The <key> suffix is the name of the feature flag.',
Expand Down Expand Up @@ -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;
Expand Down
19 changes: 19 additions & 0 deletions model/attributes/file/file__path.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
18 changes: 18 additions & 0 deletions model/attributes/file/file__size.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
53 changes: 53 additions & 0 deletions python/src/sentry_conventions/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.<key>"] = "flag.evaluation.<key>"
"""An instance of a feature flag evaluation. The value of this attribute is the boolean representing the evaluation result. The <key> suffix is the name of the feature flag.
Expand Down Expand Up @@ -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.<key>": AttributeMetadata(
brief="An instance of a feature flag evaluation. The value of this attribute is the boolean representing the evaluation result. The <key> suffix is the name of the feature flag.",
type=AttributeType.BOOLEAN,
Expand Down Expand Up @@ -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.<key>": bool,
"fp": float,
"frames.delay": int,
Expand Down
Loading