Skip to content

ref(flags): Remove organizations:tracemetrics-units-ui frontend reads - #126378

Open
cursor[bot] wants to merge 1 commit into
masterfrom
claude-rm-tracemetrics-units-ui
Open

cursor[bot] wants to merge 1 commit into
masterfrom
claude-rm-tracemetrics-units-ui

Conversation

@cursor

@cursor cursor Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Remove organizations:tracemetrics-units-ui. This flag was fully rolled out in the automator in PR #6714 on 3/5 (a Complete segment with no conditions at rollout: 100), and hasn't been touched since.

This PR collapses the frontend reads to true and deletes the useHasMetricUnitsUI hook. The registration in temporary.py and the automator value are removed in follow-ups, since frontend and backend are not atomically deployed and the value must stay until these reads have deployed.

Verified locally: pnpm run typecheck, pnpm run lint:js and pnpm test-ci on static/app/views/explore/metrics, static/app/views/detectors/components/forms/metric and the dashboards tracemetrics specs (321 tests) all pass.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Open in Web View Automation 

The flag is fully rolled out in flagpole (a "Complete" segment with no
conditions at 100%), so collapse every read to true and delete the
useHasMetricUnitsUI hook.

Co-authored-by: charlie.luo <charlie.luo@sentry.io>
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 2, 2026
@cursor
cursor Bot marked this pull request as ready for review October 2, 2026 20:47
@cursor
cursor Bot requested review from a team as code owners October 2, 2026 20:47

@cursor cursor Bot left a comment

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.

@getsentry/data-browsing @getsentry/alerts-monitors — review please. data-browsing is the flag's owner.team in flagpole; tagging alerts-monitors too because this touches static/app/views/detectors/, which you own in CODEOWNERS.

Why true is the right collapse value: the flagpole block for this flag ends in a Complete segment with conditions: [] and rollout: 100, so it already matches every org. That segment landed in sentry-options-automator#6714 on 3/5 and the flag has not been touched since (created by automator#6399 on 2/25).

Merge order — three PRs, since frontend and backend are not atomically deployed:

  1. This PR — frontend reads collapse to true, useHasMetricUnitsUI deleted. Merge first.
  2. getsentry/sentry-options-automator#10025 — removes the flagpole value. Green and ready.
  3. #126379 — removes the temporary.py registration. Must land after the automator value has deployed everywhere, otherwise features.has would fall back to default=False while reads still exist.

Two behavior notes worth a look:

  • metricOptionsQueryKey in useMetricOptions.tsx now always requests metric.unit from /events/ instead of only when the flag was on. That required adding 'metric.unit' to two field: assertions in useMetricOptions.spec.tsx.
  • hasDisplayMetricUnit lost its leading hasMetricUnitsUI parameter, and MetricDetailPanel / MetricOptionTrailingItems lost the corresponding prop.

Verified locally: pnpm run typecheck clean, pnpm run lint:js clean on all 7 changed files, and pnpm test-ci green across static/app/views/explore/metrics, static/app/views/detectors/components/forms/metric and the dashboards tracemetrics specs — 321 tests, 0 failures.

CI: 55 passing / 15 skipped / 6 neutral. The one red check, getsentry dispatch, is the author-permission gate (cursor[bot] has no write permission), not a real failure — a collaborator needs to add the Trigger: getsentry tests label to run the downstream getsentry suite.

FYI: an abandoned branch flag-cleanup/organizations-tracemetrics-units-ui already exists on this repo — one commit from 6/1 with no PR ever opened. I branched fresh off master instead of reusing it (4 months of drift; eapMetricsField.tsx from that diff no longer exists), but the approach there matches this PR. It can be deleted.

View PR

Open in Web View Automation 

Sent by Cursor Automation: Feature flag cleanup

@getsantry

getsantry Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry Bot added the Stale label Oct 24, 2026

This branch was successfully deployed

1 active deployment
Preview — 0376ad38 Deployed Oct 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant