Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
33 changes: 33 additions & 0 deletions javascript/sentry-conventions/src/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9263,6 +9263,26 @@ export const SENTRY_DSC_RELEASE = 'sentry.dsc.release';
*/
export type SENTRY_DSC_RELEASE_TYPE = string;

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

/**
* The root project ID from the dynamic sampling context. `sentry.dsc.root_project`
*
* Attribute Value Type: `string` {@link SENTRY_DSC_ROOT_PROJECT_TYPE}
*
* Contains PII: false
*
* Attribute defined in OTEL: No
*
* @example "12345"
*/
export const SENTRY_DSC_ROOT_PROJECT = 'sentry.dsc.root_project';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the best name for this attribute? @Dav1dde you might have some ideas about naming here, I think maybe we have a convention in relay already. What I know is that we use this as count_per_root_project in generic metrics, but maybe we can come up with a clearer name.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think project_id would fit, since we already have public_key which is also scoped to the DSC and therefor always the "root" -> the root is implied through the DSC.

But this is pretty confusing if one isn't familiar with DS(C)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the namespace dsc is enough to distinguish it then I'm fine with that. sentry.dsc.transaction also denotes the trace root transaction, so I guess this is fine here. Will change it to that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Dav1dde done and also changed project ID type to integer, hope thats fine


/**
* Type for {@link SENTRY_DSC_ROOT_PROJECT} sentry.dsc.root_project
*/
export type SENTRY_DSC_ROOT_PROJECT_TYPE = string;

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

/**
Expand Down Expand Up @@ -12394,6 +12414,7 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
[SENTRY_DSC_ENVIRONMENT]: 'string',
[SENTRY_DSC_PUBLIC_KEY]: 'string',
[SENTRY_DSC_RELEASE]: 'string',
[SENTRY_DSC_ROOT_PROJECT]: 'string',
[SENTRY_DSC_SAMPLED]: 'boolean',
[SENTRY_DSC_SAMPLE_RATE]: 'string',
[SENTRY_DSC_TRACE_ID]: 'string',
Expand Down Expand Up @@ -12964,6 +12985,7 @@ export type AttributeName =
| typeof SENTRY_DSC_ENVIRONMENT
| typeof SENTRY_DSC_PUBLIC_KEY
| typeof SENTRY_DSC_RELEASE
| typeof SENTRY_DSC_ROOT_PROJECT
| typeof SENTRY_DSC_SAMPLED
| typeof SENTRY_DSC_SAMPLE_RATE
| typeof SENTRY_DSC_TRACE_ID
Expand Down Expand Up @@ -18638,6 +18660,16 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
example: 'frontend@e8211be71b214afab5b85de4b4c54be3714952bb',
changelog: [{ version: '0.3.0', prs: [185] }],
},
[SENTRY_DSC_ROOT_PROJECT]: {
brief: 'The root project ID from the dynamic sampling context.',
Comment thread
constantinius marked this conversation as resolved.
Outdated
type: 'string',
pii: {
isPii: 'false',
},
isInOtel: false,
example: '12345',
changelog: [{ version: 'next', prs: [358], description: 'Added sentry.dsc.root_project attribute' }],
},
[SENTRY_DSC_SAMPLED]: {
brief: 'Whether the event was sampled according to the dynamic sampling context.',
type: 'boolean',
Expand Down Expand Up @@ -20510,6 +20542,7 @@ export type Attributes = {
[SENTRY_DSC_ENVIRONMENT]?: SENTRY_DSC_ENVIRONMENT_TYPE;
[SENTRY_DSC_PUBLIC_KEY]?: SENTRY_DSC_PUBLIC_KEY_TYPE;
[SENTRY_DSC_RELEASE]?: SENTRY_DSC_RELEASE_TYPE;
[SENTRY_DSC_ROOT_PROJECT]?: SENTRY_DSC_ROOT_PROJECT_TYPE;
[SENTRY_DSC_SAMPLED]?: SENTRY_DSC_SAMPLED_TYPE;
[SENTRY_DSC_SAMPLE_RATE]?: SENTRY_DSC_SAMPLE_RATE_TYPE;
[SENTRY_DSC_TRACE_ID]?: SENTRY_DSC_TRACE_ID_TYPE;
Expand Down
17 changes: 17 additions & 0 deletions model/attributes/sentry/sentry__dsc__root_project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"key": "sentry.dsc.root_project",
"brief": "The root project ID from the dynamic sampling context.",
"type": "string",
"pii": {
"key": "false"
},
"is_in_otel": false,
"example": "12345",
"changelog": [
{
"version": "next",
"prs": [358],
"description": "Added sentry.dsc.root_project attribute"
}
]
}
27 changes: 27 additions & 0 deletions python/src/sentry_conventions/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5212,6 +5212,18 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
Example: "frontend@e8211be71b214afab5b85de4b4c54be3714952bb"
"""

# Path: model/attributes/sentry/sentry__dsc__root_project.json
SENTRY_DSC_ROOT_PROJECT: Literal["sentry.dsc.root_project"] = (
"sentry.dsc.root_project"
)
"""The root project ID from the dynamic sampling context.

Type: str
Contains PII: false
Defined in OTEL: No
Example: "12345"
"""

# Path: model/attributes/sentry/sentry__dsc__sample_rate.json
SENTRY_DSC_SAMPLE_RATE: Literal["sentry.dsc.sample_rate"] = "sentry.dsc.sample_rate"
"""The sample rate from the dynamic sampling context.
Expand Down Expand Up @@ -12443,6 +12455,20 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
ChangelogEntry(version="0.3.0", prs=[185]),
],
),
"sentry.dsc.root_project": AttributeMetadata(
brief="The root project ID from the dynamic sampling context.",
Comment thread
constantinius marked this conversation as resolved.
Outdated
type=AttributeType.STRING,
pii=PiiInfo(isPii=IsPii.FALSE),
is_in_otel=False,
example="12345",
changelog=[
ChangelogEntry(
version="next",
prs=[358],
description="Added sentry.dsc.root_project attribute",
),
],
),
"sentry.dsc.sample_rate": AttributeMetadata(
brief="The sample rate from the dynamic sampling context.",
type=AttributeType.STRING,
Expand Down Expand Up @@ -14373,6 +14399,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
"sentry.dsc.environment": str,
"sentry.dsc.public_key": str,
"sentry.dsc.release": str,
"sentry.dsc.root_project": str,
"sentry.dsc.sample_rate": str,
"sentry.dsc.sampled": bool,
"sentry.dsc.trace_id": str,
Expand Down
Loading