:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(experiments): refresh stale recalculation results on page load (#122858)
Rodrigo Iloro2269a4b7860f
diff --git a/frontend/src/scenes/experiments/experimentMetricsLogic.test.ts b/frontend/src/scenes/experiments/experimentMetricsLogic.test.tsindex eb3936c686d2..b86b866fb449 100644--- a/frontend/src/scenes/experiments/experimentMetricsLogic.test.ts+++ b/frontend/src/scenes/experiments/experimentMetricsLogic.test.ts@@ -11,7 +11,7 @@ import preflightJson from '~/mocks/fixtures/_preflight.json'import experimentJson from '~/mocks/fixtures/api/experiments/_experiment_launched.json'import { useMocks } from '~/mocks/jest'import { initKeaTests } from '~/test/init'-import { Experiment } from '~/types'+import { Experiment, ExperimentStatus } from '~/types'import type { ExperimentMetricsRecalculationRunApi } from 'products/experiments/frontend/generated/api.schemas'@@ -34,6 +34,9 @@ const SLOW_LOAD_MESSAGE = 'Loading results is taking longer than expected. Refreconst neverSettles = (): Promise<never> => new Promise(() => {})const EXPERIMENT = experimentJson as unknown as Experiment+const hoursAgo = (hours: number): string => new Date(Date.now() - hours * 60 * 60 * 1000).toISOString()+// Relative, not a fixed date: a running experiment refreshes results older than the logic's staleness threshold.+const ONE_HOUR_AGO = hoursAgo(1)const PRIMARY_METRIC_UUID = '434cb6ba-7fa6-4ca1-b7a0-8970b2d9a47d'const SECONDARY_METRIC_UUID = 'cbdd02f8-4a27-4017-a8d8-5f989b304ada'@@ -65,7 +68,7 @@ const completedRecalculation = {completed_metrics: 2,started_at: new Date().toISOString(),completed_at: new Date().toISOString(),- query_to: '2026-06-10T00:05:00Z',+ query_to: ONE_HOUR_AGO,results: [{ metric_uuid: PRIMARY_METRIC_UUID, status: 'completed', result: primaryResult, error_message: null },{ metric_uuid: SECONDARY_METRIC_UUID, status: 'completed', result: secondaryResult, error_message: null },@@ -139,8 +142,8 @@ const timeseriesFallbackRecalculation = {status: 'completed',trigger: 'cold_run',completed_metrics: 1,- completed_at: '2026-06-10T00:05:00Z',- query_to: '2026-06-10T00:05:00Z',+ completed_at: ONE_HOUR_AGO,+ query_to: ONE_HOUR_AGO,result_source: 'timeseries_fallback',results: [{ metric_uuid: PRIMARY_METRIC_UUID, status: 'completed', result: primaryResult, error_message: null }],}@@ -637,6 +640,123 @@ describe('experimentMetricsLogic', () => {.toNotHaveDispatchedActions(['triggerRecalculation'])})+ const staleCompletedRecalculation = { ...completedRecalculation, query_to: hoursAgo(13) }++ it.each([+ {+ name: 'refreshes a running experiment whose latest results are stale',+ experiment: EXPERIMENT,+ latest: staleCompletedRecalculation,+ loads: 1,+ expectedTriggers: ['stale_refresh'],+ },+ {+ // A stale refresh advances the window over every metric, so a separate heal would only add a run.+ name: 'fills a gap in stale results with the stale refresh alone',+ experiment: experimentWithExtraMetric,+ latest: staleCompletedRecalculation,+ loads: 1,+ expectedTriggers: ['stale_refresh'],+ },+ {+ name: 'refreshes stale results only once per page load',+ experiment: EXPERIMENT,+ latest: staleCompletedRecalculation,+ loads: 2,+ expectedTriggers: ['stale_refresh'],+ },+ {+ name: 'does not refresh stale results while a run is active',+ experiment: EXPERIMENT,+ latest: { ...staleCompletedRecalculation, active_run: { id: 'recalc-2', status: 'in_progress' } },+ loads: 1,+ expectedTriggers: [],+ },+ {+ name: 'does not refresh stale results on a stopped experiment',+ experiment: { ...EXPERIMENT, end_date: '2025-01-30T21:55:00Z' } as Experiment,+ latest: staleCompletedRecalculation,+ loads: 1,+ expectedTriggers: [],+ },+ {+ name: 'does not refresh stale results on a paused experiment',+ experiment: { ...EXPERIMENT, status: ExperimentStatus.Paused } as Experiment,+ latest: staleCompletedRecalculation,+ loads: 1,+ expectedTriggers: [],+ },+ {+ name: 'does not refresh an experiment with no metrics',+ experiment: { ...EXPERIMENT, metrics: [], metrics_secondary: [], saved_metrics: [] } as Experiment,+ latest: staleCompletedRecalculation,+ loads: 1,+ expectedTriggers: [],+ },+ {+ name: 'does not refresh fresh results',+ experiment: EXPERIMENT,+ latest: completedRecalculation,+ loads: 1,+ expectedTriggers: [],+ },+ ])('$name', async ({ experiment, latest, loads, expectedTriggers }) => {+ const postedTriggers: string[] = []+ useMocks({+ get: {+ '/api/projects/:team_id/experiments/:id/metrics_recalculation/latest/': () => [200, latest],+ '/api/projects/:team_id/experiments/:id/metrics_recalculation/:recalc_id/': () => [+ 200,+ completedRecalculation2,+ ],+ },+ post: {+ // A terminal run, so the refresh does not arm a poll timer.+ '/api/projects/:team_id/experiments/:id/metrics_recalculation/': async ({ request }) => {+ const body = (await request.json()) as { trigger: string }+ postedTriggers.push(body.trigger)+ return [201, completedRecalculation2]+ },+ },+ })+ jest.useFakeTimers()+ try {+ logic = experimentMetricsLogic({ experiment })+ logic.mount()+ for (let load = 1; load <= loads; load++) {+ if (load > 1) {+ logic.actions.loadLatestRecalculation()+ }+ // Lets the latest read, a create POST and one poll tick of an active run settle.+ await jest.advanceTimersByTimeAsync(POLL_INTERVAL_MS)+ }+ expect(postedTriggers).toEqual(expectedTriggers)+ } finally {+ jest.useRealTimers()+ }+ })++ it('clears the recalculating marks when the backend answers a stale refresh with the existing run', async () => {+ // The backend judges freshness with server time and returns the latest run, which has no results on create.+ const { results: _, ...existingJob } = { ...completedRecalculation, is_existing: true }+ useMocks({+ get: {+ '/api/projects/:team_id/experiments/:id/metrics_recalculation/latest/': () => [+ 200,+ staleCompletedRecalculation,+ ],+ },+ post: { '/api/projects/:team_id/experiments/:id/metrics_recalculation/': () => [200, existingJob] },+ })+ mountLogic()++ await expectLogic(logic)+ .toDispatchActions(['triggerRecalculation', 'loadLatestRecalculation'])+ .toFinishAllListeners()+ expect(logic.values.recalculatingMetricUuids).toEqual([])+ expect(logic.values.primaryMetricsResults[0]).toEqual(primaryResult)+ })+it('accepts a timeseries fallback that covers every metric without triggering a run', async () => {useMocks({get: {@@ -973,7 +1093,7 @@ describe('experimentMetricsLogic', () => {})describe('manual refresh window', () => {- // query_to stays old, as on a stopped experiment, so the window can only come from completed_at.+ // query_to stays an hour old, outside the window, so the window can only come from completed_at.const finishedMinutesAgo = <T extends object>(latest: T,minutesAgo: numberdiff --git a/frontend/src/scenes/experiments/experimentMetricsLogic.ts b/frontend/src/scenes/experiments/experimentMetricsLogic.tsindex 57ea35602b9f..f6bd9390634c 100644--- a/frontend/src/scenes/experiments/experimentMetricsLogic.ts+++ b/frontend/src/scenes/experiments/experimentMetricsLogic.ts@@ -9,10 +9,10 @@ import { preflightLogic } from 'lib/logic/preflightLogic'import { projectLogic } from 'scenes/projectLogic'import type { CachedNewExperimentQueryResponse, ExperimentMetric } from '~/queries/schema/schema-general'-import { Experiment } from '~/types'+import { Experiment, ExperimentStatus } from '~/types'import type { ExperimentIdType } from '~/types'-import { isLaunched } from 'products/experiments/frontend/experimentStatus'+import { getExperimentStatus, isLaunched } from 'products/experiments/frontend/experimentStatus'import {experimentsMetricsRecalculationCreate,experimentsMetricsRecalculationLatestRetrieve,@@ -83,6 +83,13 @@ const MAX_POLL_DURATION_MS = 30 * 60 * 1000// A request that never settles neither resolves nor rejects, so without a deadline the page loads forever.const LATEST_REQUEST_TIMEOUT_MS = 30 * 1000const POLL_REQUEST_TIMEOUT_MS = 15 * 1000+/** Each stale refresh is a full ClickHouse recalculation, so this threshold sets the load that page visits add. */+const STALE_RESULTS_THRESHOLD_HOURS = 12+/** A paused experiment collects no new data. An exposure-frozen one still collects metric events. */+const STALE_REFRESH_STATUSES: ReadonlySet<ExperimentStatus> = new Set([+ ExperimentStatus.Running,+ ExperimentStatus.ExposureFrozen,+])class RecalculationRequestTimeoutError extends Error {}@@ -196,6 +203,12 @@ const recalculationHasGap = (experiment: Experiment, recalculation: Recalculatioreturn currentMetricUuids(experiment).some((uuid) => !coveredUuids.has(uuid))}+const resultsAreStale = (experiment: Experiment, recalculation: RecalculationPayload): boolean =>+ STALE_REFRESH_STATUSES.has(getExperimentStatus(experiment)) &&+ currentMetricUuids(experiment).length > 0 &&+ !!recalculation.query_to &&+ dayjs.utc().diff(dayjs.utc(recalculation.query_to), 'hour', true) > STALE_RESULTS_THRESHOLD_HOURS+type MetricErrorState = { detail: string; retriable: boolean } | nulltype ResolveByUuid<T> = (uuid: string) => T@@ -802,7 +815,17 @@ export const experimentMetricsLogic = kea<experimentMetricsLogicType>([* on page load. What is already shown stays visible and cells update in place as the run polls.*//** A rejected run gets the same answer on every heal, so a heal would only loop. */- if (!rejectionMessage(recalculation) && recalculationHasGap(props.experiment, recalculation)) {+ if (rejectionMessage(recalculation)) {+ return+ }+ /**+ * A stale refresh advances the window over every metric, so it also fills a gap. It runs once+ * per mount, so a run that cannot advance the window does not start a new run on every load.+ */+ if (!cache.staleRefreshRequested && resultsAreStale(props.experiment, recalculation)) {+ cache.staleRefreshRequested = true+ actions.triggerRecalculation('stale_refresh')+ } else if (recalculationHasGap(props.experiment, recalculation)) {actions.triggerRecalculation(HEAL_TRIGGER_BY_RESULT_SOURCE[recalculation.result_source])}} catch (error: any) {@@ -964,9 +987,10 @@ export const experimentMetricsLogic = kea<experimentMetricsLogicType>([/*** Create can return an already-terminal run (e.g. a completed one finished between* request and response). Load its results directly rather than polling. A rejected- * run has no results on the create response, so latest serves the earlier ones.+ * run has no results on the create response, so latest serves the earlier ones. The+ * same applies to an existing run the backend returns instead of a stale refresh.*/- if (rejectionMessage(recalculation)) {+ if (rejectionMessage(recalculation) || recalculation.is_existing) {/** A failed reload never reaches applyResults, so the marks of this create clear here. */actions.setRecalculatingMetricUuids(values.recalculatingMetricUuids.filter(diff --git a/products/experiments/backend/models/experiment.py b/products/experiments/backend/models/experiment.pyindex a2d216cdf62f..ca1269074a45 100644--- a/products/experiments/backend/models/experiment.py+++ b/products/experiments/backend/models/experiment.py@@ -546,6 +546,8 @@ class ExperimentMetricsRecalculation(TeamScopedRootMixin, UUIDModel):MANUAL = "manual", "Manual"AGENT_MCP = "agent_mcp", "Agent (MCP)"COLD_RUN = "cold_run", "Cold Run"+ # The frontend refreshes a running experiment on page load when its latest results are older than its+ # staleness threshold. Advances the window to now, so every metric recomputes.STALE_REFRESH = "stale_refresh", "Stale Refresh"# Deprecated: feature no longer available.AUTO_REFRESH = "auto_refresh", "Auto Refresh"@@ -578,13 +580,13 @@ class ExperimentMetricsRecalculation(TeamScopedRootMixin, UUIDModel):"""The subset of Trigger a client may send on POST. Each value must also exist on Trigger.The rest are set server side: agent_mcp by the view from the client header, timeseries_sync and- scheduled by their workflows. stale_refresh, auto_refresh and the deprecated values have no- sender.+ scheduled by their workflows. auto_refresh and the deprecated values have no sender."""MANUAL = "manual", "Manual"MANUAL_RETRY = "manual_retry", "Manual Retry"COLD_RUN = "cold_run", "Cold Run"+ STALE_REFRESH = "stale_refresh", "Stale Refresh"HEAL_LATEST_RUN = "heal_latest_run", "Heal Latest Run"EXPERIMENT_CONFIG_CHANGE = "experiment_config_change", "Experiment Config Change"METRIC_CONFIG_CHANGE = "metric_config_change", "Metric Config Change"diff --git a/products/experiments/backend/recalculation.py b/products/experiments/backend/recalculation.pyindex 6922842b7df5..ef18d1cf1e3d 100644--- a/products/experiments/backend/recalculation.py+++ b/products/experiments/backend/recalculation.py@@ -92,6 +92,10 @@ class RecalculationRateLimited(Throttled):default_detail = "Metrics were recalculated less than 5 minutes ago."+# Mirrors STALE_RESULTS_THRESHOLD_HOURS in experimentMetricsLogic.ts. The frontend judges staleness with the+# browser clock, so this server-side check stops a client clock that runs ahead from recalculating on every visit.+STALE_REFRESH_MIN_RESULT_AGE = timedelta(hours=12)+# A daily timeseries point older than this no longer stands in for a recalculation on the cold-start read. The# daily run happens once per day, so a fresh experiment always has a point inside the bound.TIMESERIES_FALLBACK_MAX_AGE = timedelta(hours=24)@@ -445,8 +449,9 @@ def request_recalculation(experiment: Experiment, user: User | None, trigger: st``RECALCULATION_MAX_EXPERIMENT_AGE`` ago gets a rejected run: status FAILED, ``is_existing=False``, and thecaller must not start a workflow for it either. A user-driven trigger inside``MIN_USER_RECALCULATION_INTERVAL`` after the latest completed run finished raises- ``RecalculationRateLimited`` when the organization has the rate-limit flag on. Otherwise creates a fresh- pending row.+ ``RecalculationRateLimited`` when the organization has the rate-limit flag on. A ``stale_refresh`` whose+ latest terminal run has a ``query_to`` inside ``STALE_REFRESH_MIN_RESULT_AGE`` returns that run with+ ``is_existing=True``, and the caller must not start a workflow. Otherwise creates a fresh pending row."""return _request_recalculation(experiment, user, trigger, max_age=_recalculation_max_age(experiment))@@ -504,6 +509,15 @@ def _request_recalculation(next_allowed_at = latest.completed_at + MIN_USER_RECALCULATION_INTERVALraise RecalculationRateLimited(wait=(next_allowed_at - timezone.now()).total_seconds())+ if trigger == ExperimentMetricsRecalculation.Trigger.STALE_REFRESH:+ latest = _terminal_recalculations(experiment).order_by("-created_at").first()+ if (+ latest is not None+ and latest.query_to is not None+ and latest.query_to > timezone.now() - STALE_REFRESH_MIN_RESULT_AGE+ ):+ return build_job_payload(latest, is_existing=True)+# No fresh active row, but stale tombstones might still hold the per-experiment uniqueness constraint# (unique_active_metrics_recalculation_per_experiment). Mark them FAILED so the constraint releases# and the new row can land, and cancel their workflows after commit — a superseded run that is stilldiff --git a/products/experiments/backend/test/test_metrics_recalculation_api.py b/products/experiments/backend/test/test_metrics_recalculation_api.pyindex d8ec49ea6212..930751feb4e3 100644--- a/products/experiments/backend/test/test_metrics_recalculation_api.py+++ b/products/experiments/backend/test/test_metrics_recalculation_api.py@@ -140,16 +140,21 @@ class TestMetricsRecalculationAPI(APIBaseTest):== ExperimentMetricsRecalculation.Trigger.AGENT_MCP)+ @parameterized.expand(+ [+ ("manual", ExperimentMetricsRecalculation.Trigger.MANUAL),+ ("stale_refresh", ExperimentMetricsRecalculation.Trigger.STALE_REFRESH),+ ]+ )@mock.patch("products.experiments.backend.recalculation.sync_connect")@mock.patch("products.experiments.backend.recalculation.asyncio.run")- def test_post_without_mcp_header_honors_body_trigger(self, mock_run, mock_connect):+ def test_post_without_mcp_header_honors_body_trigger(+ self, trigger: str, expected_trigger: str, mock_run, mock_connect+ ):exp = self._launched_experiment()- resp = self.client.post(self._post_url(exp.id), {"trigger": "manual"}, format="json")+ resp = self.client.post(self._post_url(exp.id), {"trigger": trigger}, format="json")assert resp.status_code == status.HTTP_201_CREATED, resp.content- assert (- ExperimentMetricsRecalculation.objects.get(experiment=exp).trigger- == ExperimentMetricsRecalculation.Trigger.MANUAL- )+ assert ExperimentMetricsRecalculation.objects.get(experiment=exp).trigger == expected_trigger@mock.patch("products.experiments.backend.recalculation.sync_connect")@mock.patch("products.experiments.backend.recalculation.asyncio.run")diff --git a/products/experiments/backend/test/test_recalculation_service.py b/products/experiments/backend/test/test_recalculation_service.pyindex 9489dbb1d7c3..956e1ff259b2 100644--- a/products/experiments/backend/test/test_recalculation_service.py+++ b/products/experiments/backend/test/test_recalculation_service.py@@ -163,6 +163,31 @@ class TestRecalculationService(BaseTest):assert 170 <= exc_info.value.wait <= 180assert ExperimentMetricsRecalculation.objects.filter(experiment=exp).count() == 1+ @parameterized.expand(+ [+ ("fresh_latest_is_returned", 1, False),+ ("stale_latest_starts_new", 13, True),+ ]+ )+ def test_stale_refresh_checks_result_age_with_server_time(+ self, name: str, query_to_hours_ago: int, expects_new_run: bool+ ):+ exp = self._launched_experiment(flag_key=f"stale-{name}")+ latest = ExperimentMetricsRecalculation.objects.create(+ team=self.team,+ experiment=exp,+ status="completed",+ trigger="manual",+ query_to=timezone.now() - timedelta(hours=query_to_hours_ago),+ completed_at=timezone.now() - timedelta(hours=query_to_hours_ago),+ )++ result = request_recalculation(exp, self.user, "stale_refresh")++ assert result["is_existing"] is not expects_new_run+ assert (result["id"] == str(latest.id)) is not expects_new_run+ assert ExperimentMetricsRecalculation.objects.filter(experiment=exp).count() == (2 if expects_new_run else 1)+@override_settings(DEBUG=True, TEST=False)@patch("products.experiments.backend.recalculation.feature_enabled_or_false", return_value=True)def test_request_recalculation_skips_the_refresh_window_in_local_development(self, _mock_flag):diff --git a/products/experiments/frontend/generated/api.schemas.ts b/products/experiments/frontend/generated/api.schemas.tsindex 43739b79959a..6ce9012fba20 100644--- a/products/experiments/frontend/generated/api.schemas.ts+++ b/products/experiments/frontend/generated/api.schemas.ts@@ -3658,6 +3658,7 @@ export interface ExperimentInSessionExposureApi {* * `manual` - Manual* * `manual_retry` - Manual Retry* * `cold_run` - Cold Run+ * * `stale_refresh` - Stale Refresh* * `heal_latest_run` - Heal Latest Run* * `experiment_config_change` - Experiment Config Change* * `metric_config_change` - Metric Config Change@@ -3669,6 +3670,7 @@ export const ExperimentMetricsRecalculationRequestTriggerEnumApi = {Manual: 'manual',ManualRetry: 'manual_retry',ColdRun: 'cold_run',+ StaleRefresh: 'stale_refresh',HealLatestRun: 'heal_latest_run',ExperimentConfigChange: 'experiment_config_change',MetricConfigChange: 'metric_config_change',@@ -3683,6 +3685,7 @@ export interface RecalculateMetricsRequestApi {* * `manual` - Manual* * `manual_retry` - Manual Retry* * `cold_run` - Cold Run+ * * `stale_refresh` - Stale Refresh* * `heal_latest_run` - Heal Latest Run* * `experiment_config_change` - Experiment Config Change* * `metric_config_change` - Metric Config Change */diff --git a/products/experiments/frontend/generated/api.zod.ts b/products/experiments/frontend/generated/api.zod.tsindex 0487fdc28d3f..c0f8746236eb 100644--- a/products/experiments/frontend/generated/api.zod.ts+++ b/products/experiments/frontend/generated/api.zod.ts@@ -1125,16 +1125,17 @@ export const ExperimentsMetricsRecalculationCreateBody = /* @__PURE__ */ zod'manual','manual_retry','cold_run',+ 'stale_refresh','heal_latest_run','experiment_config_change','metric_config_change',]).describe(- '\* `manual` - Manual\n\* `manual_retry` - Manual Retry\n\* `cold_run` - Cold Run\n\* `heal_latest_run` - Heal Latest Run\n\* `experiment_config_change` - Experiment Config Change\n\* `metric_config_change` - Metric Config Change'+ '\* `manual` - Manual\n\* `manual_retry` - Manual Retry\n\* `cold_run` - Cold Run\n\* `stale_refresh` - Stale Refresh\n\* `heal_latest_run` - Heal Latest Run\n\* `experiment_config_change` - Experiment Config Change\n\* `metric_config_change` - Metric Config Change').default(experimentsMetricsRecalculationCreateBodyTriggerDefault).describe(- 'What triggered this recalculation (manual is the default for user-initiated runs). Only client triggers are accepted; agent_mcp, timeseries_sync and scheduled are set by the server.\n\n\* `manual` - Manual\n\* `manual_retry` - Manual Retry\n\* `cold_run` - Cold Run\n\* `heal_latest_run` - Heal Latest Run\n\* `experiment_config_change` - Experiment Config Change\n\* `metric_config_change` - Metric Config Change'+ 'What triggered this recalculation (manual is the default for user-initiated runs). Only client triggers are accepted; agent_mcp, timeseries_sync and scheduled are set by the server.\n\n\* `manual` - Manual\n\* `manual_retry` - Manual Retry\n\* `cold_run` - Cold Run\n\* `stale_refresh` - Stale Refresh\n\* `heal_latest_run` - Heal Latest Run\n\* `experiment_config_change` - Experiment Config Change\n\* `metric_config_change` - Metric Config Change'),}).describe('Request body for triggering a metrics recalculation.')diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 5faaae837442..d75b7561da91 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -47379,6 +47379,7 @@ export namespace Schemas {* * `manual` - Manual* * `manual_retry` - Manual Retry* * `cold_run` - Cold Run+ * * `stale_refresh` - Stale Refresh* * `heal_latest_run` - Heal Latest Run* * `experiment_config_change` - Experiment Config Change* * `metric_config_change` - Metric Config Change@@ -47390,6 +47391,7 @@ export namespace Schemas {Manual: 'manual',ManualRetry: 'manual_retry',ColdRun: 'cold_run',+ StaleRefresh: 'stale_refresh',HealLatestRun: 'heal_latest_run',ExperimentConfigChange: 'experiment_config_change',MetricConfigChange: 'metric_config_change',@@ -99288,6 +99290,7 @@ export namespace Schemas {* * `manual` - Manual* * `manual_retry` - Manual Retry* * `cold_run` - Cold Run+ * * `stale_refresh` - Stale Refresh* * `heal_latest_run` - Heal Latest Run* * `experiment_config_change` - Experiment Config Change* * `metric_config_change` - Metric Config Change */