Skip to content

feat(attributes): Add sentry.profile_id#344

Merged
loewenheim merged 1 commit intomainfrom
sebastian/profile_id
Apr 29, 2026
Merged

feat(attributes): Add sentry.profile_id#344
loewenheim merged 1 commit intomainfrom
sebastian/profile_id

Conversation

@loewenheim
Copy link
Copy Markdown
Contributor

Description

This attribute was removed in #256, but Relay writes it for V2 spans that are converted from V1 spans.
Fixes getsentry/relay#5904. Fixes RELAY-233.

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)

@loewenheim loewenheim requested review from a team, Lms24, cleptric, lcian, mjq and nsdeschenes as code owners April 29, 2026 07:23
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Apr 29, 2026

@github-actions
Copy link
Copy Markdown

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.profile_id by loewenheim in #344
  • Add http.request_method by loewenheim in #343
  • Add middleware.name attribute by ericapisani in #337
  • Add http.request.body.data attribute by ericapisani in #336
  • Add device.low_power_mode attribute for iOS by itaybre in #314

Other

  • Add db.redis.key by sentrivana in #326
  • Add process.command_args by sentrivana in #327

Bug Fixes 🐛

  • Align code.function.name description with OTel by alexander-alderman-webb in #335
  • Don't backfill sentry.browser.* attributes by loewenheim in #339
  • Backfill several deprecated attributes by loewenheim in #332

Internal Changes 🔧

Deps

  • Bump black from 24.8.0 to 26.3.1 by tobias-wilfert in #342
  • Bump astro from 6.0.2 to 6.1.6 in /docs by dependabot in #330

Other

  • (attributes) Mark deprecated gen_ai and ai attributes as backfill by vgrozdanic in #333

🤖 This preview updates automatically when you update the PR.

[SENTRY_ORIGIN]: 'string',
[SENTRY_PLATFORM]: 'string',
[SENTRY_PROFILER_ID]: 'string',
[SENTRY_PROFILE_ID]: 'string',
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The SENTRY_PROFILE_ID attribute is not in alphabetical order in the generated TypeScript file, which is inconsistent with the Python implementation.
Severity: LOW

Suggested Fix

Reorder the SENTRY_PROFILE_ID and SENTRY_PROFILER_ID entries in the TypeScript attribute definitions, specifically in the ATTRIBUTE_TYPE map and the AttributeName union, to match the alphabetical order seen in the Python code.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: javascript/sentry-conventions/src/attributes.ts#L12168

Potential issue: In the generated TypeScript file `attributes.ts`, the
`SENTRY_PROFILE_ID` attribute is listed after `SENTRY_PROFILER_ID`. This violates the
alphabetical ordering convention that is followed in the corresponding Python
implementation. While this ordering discrepancy does not affect runtime functionality or
cause crashes, it introduces an inconsistency between the TypeScript and Python
codebases. This can negatively impact code readability and future maintenance.

Also affects:

  • javascript/sentry-conventions/src/attributes.ts:12726~12726
  • javascript/sentry-conventions/src/attributes.ts:20108~20108

Did we get this right? 👍 / 👎 to inform future reviews.

@loewenheim loewenheim merged commit d5cd532 into main Apr 29, 2026
12 checks passed
@loewenheim loewenheim deleted the sebastian/profile_id branch April 29, 2026 09:10
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.

eap: Figure out sentry.profile_id

2 participants