Skip to content

Commit 13e1f35

Browse files
authored
docs(sentry): Add deprecated sentry.source (#288)
* docs(sentry): Add deprecated `sentry.source` * ran generate
1 parent 7c57a97 commit 13e1f35

5 files changed

Lines changed: 112 additions & 5 deletions

File tree

javascript/sentry-conventions/src/attributes.ts

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8009,10 +8009,31 @@ export const SENTRY_SERVER_SAMPLE_RATE = 'sentry.server_sample_rate';
80098009
*/
80108010
export type SENTRY_SERVER_SAMPLE_RATE_TYPE = number;
80118011

8012+
// Path: model/attributes/sentry/sentry__source.json
8013+
8014+
/**
8015+
* The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers. `sentry.source`
8016+
*
8017+
* Attribute Value Type: `string` {@link SENTRY_SOURCE_TYPE}
8018+
*
8019+
* Contains PII: false
8020+
*
8021+
* Attribute defined in OTEL: No
8022+
*
8023+
* @deprecated Use {@link SENTRY_SPAN_SOURCE} (sentry.span.source) instead - This attribute is being deprecated in favor of sentry.span.source
8024+
* @example "route"
8025+
*/
8026+
export const SENTRY_SOURCE = 'sentry.source';
8027+
8028+
/**
8029+
* Type for {@link SENTRY_SOURCE} sentry.source
8030+
*/
8031+
export type SENTRY_SOURCE_TYPE = string;
8032+
80128033
// Path: model/attributes/sentry/sentry__span__source.json
80138034

80148035
/**
8015-
* The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. `sentry.span.source`
8036+
* The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers. `sentry.span.source`
80168037
*
80178038
* Attribute Value Type: `string` {@link SENTRY_SPAN_SOURCE_TYPE}
80188039
*
@@ -10201,6 +10222,7 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
1020110222
[_SENTRY_SEGMENT_ID]: 'string',
1020210223
[SENTRY_SEGMENT_NAME]: 'string',
1020310224
[SENTRY_SERVER_SAMPLE_RATE]: 'double',
10225+
[SENTRY_SOURCE]: 'string',
1020410226
[SENTRY_SPAN_SOURCE]: 'string',
1020510227
[SENTRY_STATUS_CODE]: 'integer',
1020610228
[SENTRY_STATUS_MESSAGE]: 'string',
@@ -10670,6 +10692,7 @@ export type AttributeName =
1067010692
| typeof _SENTRY_SEGMENT_ID
1067110693
| typeof SENTRY_SEGMENT_NAME
1067210694
| typeof SENTRY_SERVER_SAMPLE_RATE
10695+
| typeof SENTRY_SOURCE
1067310696
| typeof SENTRY_SPAN_SOURCE
1067410697
| typeof SENTRY_STATUS_CODE
1067510698
| typeof SENTRY_STATUS_MESSAGE
@@ -15452,9 +15475,24 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
1545215475
example: 0.5,
1545315476
changelog: [{ version: '0.1.0', prs: [102] }],
1545415477
},
15478+
[SENTRY_SOURCE]: {
15479+
brief:
15480+
"The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers.",
15481+
type: 'string',
15482+
pii: {
15483+
isPii: 'false',
15484+
},
15485+
isInOtel: false,
15486+
example: 'route',
15487+
deprecation: {
15488+
replacement: 'sentry.span.source',
15489+
reason: 'This attribute is being deprecated in favor of sentry.span.source',
15490+
},
15491+
changelog: [{ version: 'next' }],
15492+
},
1545515493
[SENTRY_SPAN_SOURCE]: {
1545615494
brief:
15457-
"The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`.",
15495+
"The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers.",
1545815496
type: 'string',
1545915497
pii: {
1546015498
isPii: 'false',
@@ -16764,6 +16802,7 @@ export type Attributes = {
1676416802
[_SENTRY_SEGMENT_ID]?: _SENTRY_SEGMENT_ID_TYPE;
1676516803
[SENTRY_SEGMENT_NAME]?: SENTRY_SEGMENT_NAME_TYPE;
1676616804
[SENTRY_SERVER_SAMPLE_RATE]?: SENTRY_SERVER_SAMPLE_RATE_TYPE;
16805+
[SENTRY_SOURCE]?: SENTRY_SOURCE_TYPE;
1676716806
[SENTRY_SPAN_SOURCE]?: SENTRY_SPAN_SOURCE_TYPE;
1676816807
[SENTRY_STATUS_CODE]?: SENTRY_STATUS_CODE_TYPE;
1676916808
[SENTRY_STATUS_MESSAGE]?: SENTRY_STATUS_MESSAGE_TYPE;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"key": "sentry.source",
3+
"brief": "The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers.",
4+
"type": "string",
5+
"pii": {
6+
"key": "false"
7+
},
8+
"is_in_otel": false,
9+
"example": "route",
10+
"deprecation": {
11+
"_status": "backfill",
12+
"replacement": "sentry.span.source",
13+
"reason": "This attribute is being deprecated in favor of sentry.span.source"
14+
},
15+
"changelog": [
16+
{
17+
"version": "next"
18+
}
19+
]
20+
}

model/attributes/sentry/sentry__span__source.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"key": "sentry.span.source",
3-
"brief": "The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`.",
3+
"brief": "The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers.",
44
"type": "string",
55
"pii": {
66
"key": "false"

python/src/sentry_conventions/attributes.py

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ class _AttributeNamesMeta(type):
210210
"SENTRY_BROWSER_NAME",
211211
"SENTRY_BROWSER_VERSION",
212212
"_SENTRY_SEGMENT_ID",
213+
"SENTRY_SOURCE",
213214
"TRANSACTION",
214215
"TTFB_REQUESTTIME",
215216
"TTFB",
@@ -4523,9 +4524,20 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
45234524
Example: 0.5
45244525
"""
45254526

4527+
# Path: model/attributes/sentry/sentry__source.json
4528+
SENTRY_SOURCE: Literal["sentry.source"] = "sentry.source"
4529+
"""The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers.
4530+
4531+
Type: str
4532+
Contains PII: false
4533+
Defined in OTEL: No
4534+
DEPRECATED: Use sentry.span.source instead - This attribute is being deprecated in favor of sentry.span.source
4535+
Example: "route"
4536+
"""
4537+
45264538
# Path: model/attributes/sentry/sentry__span__source.json
45274539
SENTRY_SPAN_SOURCE: Literal["sentry.span.source"] = "sentry.span.source"
4528-
"""The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`.
4540+
"""The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers.
45294541
45304542
Type: str
45314543
Contains PII: false
@@ -9995,8 +10007,23 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
999510007
ChangelogEntry(version="0.1.0", prs=[102]),
999610008
],
999710009
),
10010+
"sentry.source": AttributeMetadata(
10011+
brief="The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers.",
10012+
type=AttributeType.STRING,
10013+
pii=PiiInfo(isPii=IsPii.FALSE),
10014+
is_in_otel=False,
10015+
example="route",
10016+
deprecation=DeprecationInfo(
10017+
replacement="sentry.span.source",
10018+
reason="This attribute is being deprecated in favor of sentry.span.source",
10019+
status=DeprecationStatus.BACKFILL,
10020+
),
10021+
changelog=[
10022+
ChangelogEntry(version="next"),
10023+
],
10024+
),
999810025
"sentry.span.source": AttributeMetadata(
9999-
brief="The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`.",
10026+
brief="The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers.",
1000010027
type=AttributeType.STRING,
1000110028
pii=PiiInfo(isPii=IsPii.FALSE),
1000210029
is_in_otel=False,
@@ -11337,6 +11364,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
1133711364
"sentry.segment.name": str,
1133811365
"sentry.segment_id": str,
1133911366
"sentry.server_sample_rate": float,
11367+
"sentry.source": str,
1134011368
"sentry.span.source": str,
1134111369
"sentry.status.message": str,
1134211370
"sentry.status_code": int,

shared/deprecated_attributes.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2698,6 +2698,26 @@
26982698
}
26992699
]
27002700
},
2701+
{
2702+
"key": "sentry.source",
2703+
"brief": "The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers.",
2704+
"type": "string",
2705+
"pii": {
2706+
"key": "false"
2707+
},
2708+
"is_in_otel": false,
2709+
"example": "route",
2710+
"deprecation": {
2711+
"_status": "backfill",
2712+
"replacement": "sentry.span.source",
2713+
"reason": "This attribute is being deprecated in favor of sentry.span.source"
2714+
},
2715+
"changelog": [
2716+
{
2717+
"version": "next"
2718+
}
2719+
]
2720+
},
27012721
{
27022722
"key": "ttfb.requestTime",
27032723
"brief": "The time it takes for the server to process the initial request and send the first byte of a response to the user's browser",

0 commit comments

Comments
 (0)