Skip to content

feat(attributes): add sentry.dsc.project_id as an attribute#358

Open
constantinius wants to merge 5 commits into
mainfrom
constantinius/feat/attributes/add-sentry-dsc-root-project
Open

feat(attributes): add sentry.dsc.project_id as an attribute#358
constantinius wants to merge 5 commits into
mainfrom
constantinius/feat/attributes/add-sentry-dsc-root-project

Conversation

@constantinius
Copy link
Copy Markdown
Contributor

@constantinius constantinius commented May 11, 2026

Description

Required for Dynamic Sampling

Contributes to https://linear.app/getsentry/issue/TET-2341/write-root-transaction-and-project-onto-every-span-in-relay

PR Checklist

  • I have run yarn test and verified that the tests pass.
  • I have run yarn generate to generate and format code and docs.

If an attribute was added:

  • The attribute is in a namespace (e.g. nextjs.function_id, not function_id)
  • I have used the correct value for pii (i.e. maybe or true. Use false only for values that should never be scrubbed such as IDs)

If an attribute was deprecated:

@constantinius constantinius requested review from a team, Lms24, cleptric, mjq and nsdeschenes as code owners May 11, 2026 13:26
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 11, 2026

TET-2341

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 11, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Attributes

  • Add sentry.dsc.project_id as an attribute by constantinius in #358
  • Add calculated performance scores by loewenheim in #355
  • Add rpc.response.status_code attribute by alexander-alderman-webb in #352
  • Add rpc.method attribute by alexander-alderman-webb in #351
  • Add app vitals start attributes by buenaflor in #353
  • Add process.runtime.engine.* attributes by chargome in #347

Bug Fixes 🐛

  • (attributes) Change several deprecation statuses to normalize to align with ingestion paths by constantinius in #350
  • (create) Replace angle brackets in file names by loewenheim in #356

Internal Changes 🔧

  • (gh) Remove myself from CODEOWNERS by lcian in #354
  • Bump vulnerable js packages by chargome in #359

🤖 This preview updates automatically when you update the PR.

@constantinius constantinius requested a review from Dav1dde May 11, 2026 13:27
Comment thread javascript/sentry-conventions/src/attributes.ts Outdated
*
* @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

Comment thread python/src/sentry_conventions/attributes.py Outdated
@constantinius constantinius changed the title feat(attributes): add sentry.dsc.root_project as an attribute feat(attributes): add sentry.dsc.project_id as an attribute May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants