Skip to content

ref: Remove generic metrics migrations and the cardinality analyzer - #8499

Merged
phacops merged 4 commits into
masterfrom
ref/remove-generic-metrics-migrations
Sep 28, 2026
Merged

phacops merged 4 commits into
masterfrom
ref/remove-generic-metrics-migrations

Conversation

@phacops

@phacops phacops commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Removes what was left of generic metrics after #8474: the migration files, the generic_metrics migration group, all generic_metrics_* storage sets in the cluster settings, and the admin Cardinality Analyzer tool, which only queried the leftover generic metrics tables.

snuba migrations and snuba-admin no longer recognize the generic_metrics group. Rows for it already in migrations_local are ignored, because the runner only reads status for active groups. The ClickHouse tables themselves are not dropped here. The admin app loses the Cardinality Analyzer tab, its /cardinality_queries and /cardinality_query endpoints, the CardinalityAnalyzer role, and that role's IAM binding.

The cardinality-report cronjob is also removed from the deploy script. It ran the spans cardinality analyzer, whose code was removed in #7955. The CARDINALITY_ANALYZER ClickHouse client settings are renamed to OUTCOMES_ANALYZER, since the Outcomes Analyzer is their only remaining user. The settings values are unchanged.

Tests that used generic metrics as a stand-in group or storage set now use metrics or profiles. The historical-import test for a generic metrics migration and the unused genmetrics_db fixture are gone.

Generic metrics is already deprecated, so drop its migration files. The loader now returns no migrations, matching how the sessions group was removed. Tests that depended on generic metrics migrations now use the metrics group or are dropped.
@phacops
phacops marked this pull request as ready for review September 28, 2026 21:30
@phacops
phacops requested a review from a team as a code owner September 28, 2026 21:30
@phacops
phacops enabled auto-merge (squash) September 28, 2026 21:35
The sets, distributions, and gauges storage sets have no storages, migrations, or code references left, so drop them from the cluster settings.
…storage set

Drop the generic_metrics migration group, the generic_metrics_counters storage set, and the admin Cardinality Analyzer tool that queried the leftover generic metrics counters tables. Tests that used generic metrics as a fixture now use metrics or profiles.
@phacops phacops changed the title ref(migrations): Remove generic metrics migrations ref(migrations): Remove generic metrics migrations and remaining config Sep 28, 2026
…ent settings

The cardinality-report cronjob ran the spans cardinality analyzer, which was removed in #7955. Rename the CARDINALITY_ANALYZER ClickHouse client settings to OUTCOMES_ANALYZER since the Outcomes Analyzer is their only remaining user.
@phacops phacops changed the title ref(migrations): Remove generic metrics migrations and remaining config ref: Remove generic metrics migrations and the cardinality analyzer Sep 28, 2026
@phacops
phacops merged commit 4e3a5a9 into master Sep 28, 2026
68 checks passed
@phacops
phacops deleted the ref/remove-generic-metrics-migrations branch September 28, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants