Repository navigation
ref(flags): Remove organizations:tracemetrics-units-ui frontend reads - #126378
cursor[bot] wants to merge 1 commit into
Conversation
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>
There was a problem hiding this comment.
@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:
- This PR — frontend reads collapse to
true,useHasMetricUnitsUIdeleted. Merge first. - getsentry/sentry-options-automator#10025 — removes the flagpole value. Green and ready.
- #126379 — removes the
temporary.pyregistration. Must land after the automator value has deployed everywhere, otherwisefeatures.haswould fall back todefault=Falsewhile reads still exist.
Two behavior notes worth a look:
metricOptionsQueryKeyinuseMetricOptions.tsxnow always requestsmetric.unitfrom/events/instead of only when the flag was on. That required adding'metric.unit'to twofield:assertions inuseMetricOptions.spec.tsx.hasDisplayMetricUnitlost its leadinghasMetricUnitsUIparameter, andMetricDetailPanel/MetricOptionTrailingItemslost 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.
Sent by Cursor Automation: Feature flag cleanup
|
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 "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |


Remove
organizations:tracemetrics-units-ui. This flag was fully rolled out in the automator in PR #6714 on 3/5 (aCompletesegment with no conditions atrollout: 100), and hasn't been touched since.This PR collapses the frontend reads to
trueand deletes theuseHasMetricUnitsUIhook. The registration intemporary.pyand 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:jsandpnpm test-cionstatic/app/views/explore/metrics,static/app/views/detectors/components/forms/metricand 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.