Skip to content

Commit

Permalink
use_on_demand_metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
obostjancic committed Jul 20, 2023
1 parent 3b2fd6f commit c429213
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/sentry/api/endpoints/organization_events_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ def get(self, request: Request, organization: Organization) -> Response:
allow_metric_aggregates = request.GET.get("preventMetricAggregates") != "1"
sentry_sdk.set_tag("performance.metrics_enhanced", metrics_enhanced)

use_on_demand_metrics = request.GET.get("useOnDemandMetrics")

def get_event_stats(
query_columns: Sequence[str],
query: str,
Expand Down Expand Up @@ -218,9 +220,8 @@ def get_event_stats(
allow_metric_aggregates=allow_metric_aggregates,
has_metrics=use_metrics,
use_metrics_layer=batch_features.get("organizations:use-metrics-layer", False),
on_demand_metrics_enabled=batch_features.get(
"organizations:on-demand-metrics-extraction", False
),
on_demand_metrics_enabled=use_on_demand_metrics
and batch_features.get("organizations:on-demand-metrics-extraction", False),
)

try:
Expand Down

0 comments on commit c429213

Please sign in to comment.