@@ -30,10 +30,11 @@ import {EventsStats, MultiSeriesEventsStats, Organization, Project} from 'sentry
30
30
import { defined } from 'sentry/utils' ;
31
31
import { metric , trackAnalytics } from 'sentry/utils/analytics' ;
32
32
import type EventView from 'sentry/utils/discover/eventView' ;
33
+ import { isOnDemandQueryString } from 'sentry/utils/onDemandMetrics' ;
33
34
import {
34
35
hasOnDemandMetricAlertFeature ,
35
- isOnDemandQueryString ,
36
- } from 'sentry/utils/onDemandMetrics' ;
36
+ shouldShowOnDemandMetricAlertUI ,
37
+ } from 'sentry/utils/onDemandMetrics/features ' ;
37
38
import { normalizeUrl } from 'sentry/utils/withDomainRequired' ;
38
39
import withProjects from 'sentry/utils/withProjects' ;
39
40
import { IncompatibleAlertQuery } from 'sentry/views/alerts/rules/metric/incompatibleAlertQuery' ;
@@ -798,7 +799,9 @@ class RuleFormContainer extends DeprecatedAsyncComponent<Props, State> {
798
799
handleTimeSeriesDataFetched = ( data : EventsStats | MultiSeriesEventsStats | null ) => {
799
800
const { isExtrapolatedData} = data ?? { } ;
800
801
801
- this . setState ( { isExtrapolatedChartData : Boolean ( isExtrapolatedData ) } ) ;
802
+ if ( shouldShowOnDemandMetricAlertUI ( this . props . organization ) ) {
803
+ this . setState ( { isExtrapolatedChartData : Boolean ( isExtrapolatedData ) } ) ;
804
+ }
802
805
803
806
const { dataset, aggregate, query} = this . state ;
804
807
if ( ! isOnDemandMetricAlert ( dataset , aggregate , query ) ) {
@@ -826,7 +829,7 @@ class RuleFormContainer extends DeprecatedAsyncComponent<Props, State> {
826
829
const { ruleId, organization} = this . props ;
827
830
const hasMetricsFeatureFlags =
828
831
organization . features . includes ( 'mep-rollout-flag' ) ||
829
- organization . features . includes ( 'on-demand-metrics-extraction' ) ;
832
+ hasOnDemandMetricAlertFeature ( organization ) ;
830
833
831
834
const isCreatingRule = ! ruleId ;
832
835
0 commit comments