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.

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.py
index 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_investigation
from posthog.temporal.ai.anomaly_investigation.tools import _run_detector_simulation
from posthog.temporal.common.base import PostHogWorkflow
from posthog.temporal.common.heartbeat import Heartbeater
+from posthog.utils import absolute_uri
from 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