Skip to content
Closed
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
47 changes: 47 additions & 0 deletions javascript/sentry-conventions/src/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14564,6 +14564,30 @@ export const SENTRY_ACTION = 'sentry.action';
*/
export type SENTRY_ACTION_TYPE = string;

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

/**
* The domain the instrumented app is running on. For browsers, that's the current window's url. For server-side applications, the domain the application is deployed on. Importantly, this attribute MUST NOT be used to describe urls of outgoing requests. `sentry.app.url.domain`
*
* Attribute Value Type: `string` {@link SENTRY_APP_URL_DOMAIN_TYPE}
*
* Apply Scrubbing: manual
*
* Attribute defined in OTEL: No
* Visibility: public
*
* @example "localhost"
* @example "api.project.com"
* @example "127.0.01"
* @example "::1"
*/
export const SENTRY_APP_URL_DOMAIN = 'sentry.app.url.domain';

/**
* Type for {@link SENTRY_APP_URL_DOMAIN} sentry.app.url.domain
*/
export type SENTRY_APP_URL_DOMAIN_TYPE = string;

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

/**
Expand Down Expand Up @@ -19335,6 +19359,7 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
'score.total': 'double',
'score.weight.<key>': 'double',
'sentry.action': 'string',
'sentry.app.url.domain': 'string',
'sentry.browser.name': 'string',
'sentry.browser.version': 'string',
'sentry.cancellation_reason': 'string',
Expand Down Expand Up @@ -20171,6 +20196,7 @@ export type AttributeName =
| typeof SCORE_TOTAL
| typeof SCORE_WEIGHT_KEY
| typeof SENTRY_ACTION
| typeof SENTRY_APP_URL_DOMAIN
| typeof SENTRY_BROWSER_NAME
| typeof SENTRY_BROWSER_VERSION
| typeof SENTRY_CANCELLATION_REASON
Expand Down Expand Up @@ -30739,6 +30765,26 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
name: 'span.action',
},
},
'sentry.app.url.domain': {
brief:
"The domain the instrumented app is running on. For browsers, that's the current window's url. For server-side applications, the domain the application is deployed on. Importantly, this attribute MUST NOT be used to describe urls of outgoing requests.",
type: 'string',
keys: ['sentry.app.url.domain'],
applyScrubbing: {
key: 'manual',
},
isInOtel: false,
visibility: 'public',
example: 'localhost',
examples: ['localhost', 'api.project.com', '127.0.01', '::1'],
changelog: [{ version: 'next', prs: [635], description: 'Added sentry.app.url.domain attribute' }],
additionalContext: [
"This attribute exists to enable sending the app's domain on every span, regardless of span kind. Other, existing URL attributes are ambiguous and serve different purposes for spans describing incoming or outgoing requests.",
"This attribute is used for Sentry's Inbound filters, for example, to filter out telemetry emitted from localhost",
'The attribute MAY carry an IP address, if a resolved domain name is not available.',
"To avoid conflicts with OTel's definition of the `app` namespace, this attribute is prefixed with `sentry.`",
],
},
'sentry.browser.name': {
brief: 'The name of the browser.',
type: 'string',
Expand Down Expand Up @@ -34128,6 +34174,7 @@ export type Attributes = {
[SCORE_TOTAL]?: SCORE_TOTAL_TYPE;
[SCORE_WEIGHT_KEY]?: SCORE_WEIGHT_KEY_TYPE;
[SENTRY_ACTION]?: SENTRY_ACTION_TYPE;
[SENTRY_APP_URL_DOMAIN]?: SENTRY_APP_URL_DOMAIN_TYPE;
[SENTRY_BROWSER_NAME]?: SENTRY_BROWSER_NAME_TYPE;
[SENTRY_BROWSER_VERSION]?: SENTRY_BROWSER_VERSION_TYPE;
[SENTRY_CANCELLATION_REASON]?: SENTRY_CANCELLATION_REASON_TYPE;
Expand Down
13 changes: 13 additions & 0 deletions javascript/sentry-conventions/src/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3739,6 +3739,11 @@ export const SEARCH_SDK__VERSION = 'sdk.version';
*/
export const SEARCH_SENTRY__ACTION = 'sentry.action';

/**
* Search name for {@link attributes.SENTRY_APP_URL_DOMAIN}. `sentry.app.url.domain`
*/
export const SEARCH_SENTRY__APP__URL__DOMAIN = 'sentry.app.url.domain';

/**
* Search name for {@link attributes.SENTRY_BROWSER_VERSION}. `sentry.browser.version`
*
Expand Down Expand Up @@ -5466,6 +5471,7 @@ export type AttributeSearchName =
| typeof SEARCH_SDK__NAME
| typeof SEARCH_SDK__VERSION
| typeof SEARCH_SENTRY__ACTION
| typeof SEARCH_SENTRY__APP__URL__DOMAIN
| typeof SEARCH_SENTRY__BROWSER__VERSION
| typeof SEARCH_SENTRY__CANCELLATION_REASON
| typeof SEARCH_SENTRY__CATEGORY
Expand Down Expand Up @@ -9878,6 +9884,13 @@ export const ATTRIBUTE_SEARCH_METADATA: Record<string, AttributeSearchMetadata>
brief: 'The sentry sdk version.',
deprecationChain: ['sentry.sdk.version', 'sdk.version'],
},
'sentry.app.url.domain': {
canonicalName: 'sentry.app.url.domain',
type: 'string',
brief:
"The domain the instrumented app is running on. For browsers, that's the current window's url. For server-side applications, the domain the application is deployed on. Importantly, this attribute MUST NOT be used to describe urls of outgoing requests.",
deprecationChain: ['sentry.app.url.domain'],
},
'sentry.browser.version': {
canonicalName: 'browser.version',
type: 'string',
Expand Down
24 changes: 24 additions & 0 deletions model/attributes/sentry/sentry__app__url__domain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"key": "sentry.app.url.domain",
"brief": "The domain the instrumented app is running on. For browsers, that's the current window's url. For server-side applications, the domain the application is deployed on. Importantly, this attribute MUST NOT be used to describe urls of outgoing requests.",
"additional_context": [
"This attribute exists to enable sending the app's domain on every span, regardless of span kind. Other, existing URL attributes are ambiguous and serve different purposes for spans describing incoming or outgoing requests.",
"This attribute is used for Sentry's Inbound filters, for example, to filter out telemetry emitted from localhost",
"The attribute MAY carry an IP address, if a resolved domain name is not available.",
"To avoid conflicts with OTel's definition of the `app` namespace, this attribute is prefixed with `sentry.`"
],
Comment thread
cursor[bot] marked this conversation as resolved.
"type": "string",
"apply_scrubbing": {
"key": "manual"
},
"is_in_otel": false,
"visibility": "public",
"examples": ["localhost", "api.project.com", "127.0.01", "::1"],
"changelog": [
{
"version": "next",
"prs": [635],
"description": "Added sentry.app.url.domain attribute"
}
]
}
38 changes: 38 additions & 0 deletions python/src/sentry_conventions/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8588,6 +8588,20 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
Example: "SELECT"
"""

# Path: model/attributes/sentry/sentry__app__url__domain.json
SENTRY_APP_URL_DOMAIN: Literal["sentry.app.url.domain"] = "sentry.app.url.domain"
"""The domain the instrumented app is running on. For browsers, that's the current window's url. For server-side applications, the domain the application is deployed on. Importantly, this attribute MUST NOT be used to describe urls of outgoing requests.

Type: str
Apply Scrubbing: manual
Defined in OTEL: No
Visibility: public
Example: "localhost"
Example: "api.project.com"
Example: "127.0.01"
Example: "::1"
"""

# Path: model/attributes/sentry/sentry__browser__name.json
SENTRY_BROWSER_NAME: Literal["sentry.browser.name"] = "sentry.browser.name"
"""The name of the browser.
Expand Down Expand Up @@ -23101,6 +23115,29 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
],
search_alias=SearchAlias(name="span.action"),
),
"sentry.app.url.domain": AttributeMetadata(
brief="The domain the instrumented app is running on. For browsers, that's the current window's url. For server-side applications, the domain the application is deployed on. Importantly, this attribute MUST NOT be used to describe urls of outgoing requests.",
type=AttributeType.STRING,
keys=("sentry.app.url.domain",),
apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL),
is_in_otel=False,
visibility=Visibility.PUBLIC,
example="localhost",
examples=["localhost", "api.project.com", "127.0.01", "::1"],
changelog=[
ChangelogEntry(
version="next",
prs=[635],
description="Added sentry.app.url.domain attribute",
),
],
additional_context=[
"This attribute exists to enable sending the app's domain on every span, regardless of span kind. Other, existing URL attributes are ambiguous and serve different purposes for spans describing incoming or outgoing requests.",
"This attribute is used for Sentry's Inbound filters, for example, to filter out telemetry emitted from localhost",
"The attribute MAY carry an IP address, if a resolved domain name is not available.",
"To avoid conflicts with OTel's definition of the `app` namespace, this attribute is prefixed with `sentry.`",
],
),
"sentry.browser.name": AttributeMetadata(
brief="The name of the browser.",
type=AttributeType.STRING,
Expand Down Expand Up @@ -26792,6 +26829,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
"score.total": float,
"score.weight.<key>": float,
"sentry.action": str,
"sentry.app.url.domain": str,
"sentry.browser.name": str,
"sentry.browser.version": str,
"sentry.cancellation_reason": str,
Expand Down
Loading