Skip to content

: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.

chore(experiments): remove narrated branch comments (#104827)

Paul D'Ambra5702137ae19c
diff --git a/products/experiments/backend/models/experiment.py b/products/experiments/backend/models/experiment.py
index 7c41fe5c4522..3ff2ced70c18 100644
--- a/products/experiments/backend/models/experiment.py
+++ b/products/experiments/backend/models/experiment.py
@@ -366,12 +366,10 @@ LEGACY_METRIC_KINDS: frozenset[str] = frozenset({"ExperimentTrendsQuery", "Exper
def experiment_has_legacy_metrics(experiment: "Experiment") -> bool:
"""Check if experiment uses legacy metric formats."""
- # Check inline metrics
all_metrics = (experiment.metrics or []) + (experiment.metrics_secondary or [])
if any(m.get("kind") in LEGACY_METRIC_KINDS for m in all_metrics):
return True
- # Check saved metrics
if experiment.experimenttosavedmetric_set.filter(saved_metric__query__kind__in=LEGACY_METRIC_KINDS).exists():
return True