: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
fix(alerts): use absolute notebook url in investigation breach line (#59172)
Andrew Maguire0486b7d23ba5
diff --git a/posthog/temporal/ai/anomaly_investigation/workflow.py b/posthog/temporal/ai/anomaly_investigation/workflow.pyindex 3290e903cced..908201db07fb 100644--- a/posthog/temporal/ai/anomaly_investigation/workflow.py+++ b/posthog/temporal/ai/anomaly_investigation/workflow.py@@ -31,6 +31,7 @@ from posthog.temporal.ai.anomaly_investigation.runner import run_investigationfrom posthog.temporal.ai.anomaly_investigation.tools import _run_detector_simulationfrom posthog.temporal.common.base import PostHogWorkflowfrom posthog.temporal.common.heartbeat import Heartbeater+from posthog.utils import absolute_urifrom products.notebooks.backend.models import Notebook@@ -270,7 +271,8 @@ def _build_breach_descriptions(if summary:lines.append(summary)if notebook_short_id:- lines.append(f"See /notebooks/{notebook_short_id} for the full investigation.")+ notebook_url = absolute_uri(f"/notebooks/{notebook_short_id}")+ lines.append(f"See {notebook_url} for the full investigation.")return lines