: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
feat(signals): surface health check issues as inbox signals (#61955)
Rafael Audibert5a32d0ebd07b
diff --git a/frontend/src/queries/schema.json b/frontend/src/queries/schema.jsonindex adb0d3337d0b..eaf630b1a500 100644--- a/frontend/src/queries/schema.json+++ b/frontend/src/queries/schema.json@@ -22927,6 +22927,74 @@}]},+ "HealthCheckSeverity": {+ "enum": ["critical", "warning", "info"],+ "type": "string"+ },+ "HealthCheckSignalExtra": {+ "additionalProperties": false,+ "properties": {+ "issue_id": {+ "type": "string"+ },+ "kind": {+ "type": "string"+ },+ "link": {+ "description": "Relative in-app path to the resource, e.g. '/web'.",+ "type": "string"+ },+ "payload": {+ "additionalProperties": {},+ "type": "object"+ },+ "severity": {+ "$ref": "#/definitions/HealthCheckSeverity"+ },+ "summary": {+ "type": "string"+ },+ "title": {+ "type": "string"+ },+ "url": {+ "description": "Absolute URL ({project.url} + link).",+ "type": "string"+ }+ },+ "required": ["kind", "severity", "issue_id", "title", "summary", "link", "url", "payload"],+ "type": "object"+ },+ "HealthCheckSignalInput": {+ "additionalProperties": false,+ "properties": {+ "description": {+ "type": "string"+ },+ "extra": {+ "$ref": "#/definitions/HealthCheckSignalExtra"+ },+ "remediation": {+ "$ref": "#/definitions/SignalRemediation"+ },+ "source_id": {+ "type": "string"+ },+ "source_product": {+ "const": "health_checks",+ "type": "string"+ },+ "source_type": {+ "const": "health_issue",+ "type": "string"+ },+ "weight": {+ "type": "number"+ }+ },+ "required": ["description", "extra", "source_id", "source_product", "source_type", "weight"],+ "type": "object"+ },"HeatMapQuerySource": {"$ref": "#/definitions/EventsNode"},@@ -40030,6 +40098,9 @@},{"$ref": "#/definitions/LogsAlertStateChangeSignalInput"+ },+ {+ "$ref": "#/definitions/HealthCheckSignalInput"}]},@@ -40115,7 +40186,8 @@"endpoints","pganalyze","signals_scout",- "logs"+ "logs",+ "health_checks"],"type": "string"},@@ -40132,7 +40204,8 @@"issue_spiking","endpoint_execution_failed","cross_source_issue",- "alert_state_change"+ "alert_state_change",+ "health_issue"],"type": "string"},diff --git a/frontend/src/queries/schema/schema-signals.ts b/frontend/src/queries/schema/schema-signals.tsindex d2607e357c94..da3984065d03 100644--- a/frontend/src/queries/schema/schema-signals.ts+++ b/frontend/src/queries/schema/schema-signals.ts@@ -14,6 +14,7 @@ export enum SignalSourceProduct {PGANALYZE = 'pganalyze',SIGNALS_SCOUT = 'signals_scout',LOGS = 'logs',+ HEALTH_CHECKS = 'health_checks',}export enum SignalSourceType {@@ -29,6 +30,7 @@ export enum SignalSourceType {ENDPOINT_EXECUTION_FAILED = 'endpoint_execution_failed',CROSS_SOURCE_ISSUE = 'cross_source_issue',ALERT_STATE_CHANGE = 'alert_state_change',+ HEALTH_ISSUE = 'health_issue',}// ── Shared optional remediation ──────────────────────────────────────────────────@@ -363,6 +365,29 @@ export interface LogsAlertStateChangeSignalInput extends SignalInputBase {extra: LogsAlertStateChangeSignalExtra}+// Health-check issue (instrumentation problem detected by a HealthCheck)++export type HealthCheckSeverity = 'critical' | 'warning' | 'info'++export interface HealthCheckSignalExtra extends SignalExtraBase {+ kind: string+ severity: HealthCheckSeverity+ issue_id: string+ title: string+ summary: string+ /** Relative in-app path to the resource, e.g. '/web'. */+ link: string+ /** Absolute URL ({project.url} + link). */+ url: string+ payload: Record<string, unknown>+}++export interface HealthCheckSignalInput extends SignalInputBase {+ source_type: 'health_issue'+ source_product: 'health_checks'+ extra: HealthCheckSignalExtra+}+// ── Report reviewer types ────────────────────────────────────────────────────────export interface RelevantCommit {@@ -404,3 +429,4 @@ export type SignalInput =| PgAnalyzeIssueSignalInput| SignalsScoutSignalInput| LogsAlertStateChangeSignalInput+ | HealthCheckSignalInputdiff --git a/frontend/src/scenes/inbox/SourcesList.tsx b/frontend/src/scenes/inbox/SourcesList.tsxindex 750872516a4e..db677aa5aa2a 100644--- a/frontend/src/scenes/inbox/SourcesList.tsx+++ b/frontend/src/scenes/inbox/SourcesList.tsx@@ -2,7 +2,7 @@ import { useActions, useValues } from 'kea'import posthog from 'posthog-js'import { useState } from 'react'-import { IconArrowRight, IconBell, IconGithub, IconLinear } from '@posthog/icons'+import { IconArrowRight, IconBell, IconGithub, IconHeartPlus, IconLinear } from '@posthog/icons'import { LemonButton, Spinner } from '@posthog/lemon-ui'import { RecordingsUniversalFiltersDisplay } from 'lib/components/Cards/InsightCard/RecordingsUniversalFiltersDisplay'@@ -147,12 +147,14 @@ export function SourcesList(): JSX.Element {zendeskTicketsConfig,pgAnalyzeIssuesConfig,errorTrackingIsFullyEnabled,+ healthChecksConfig,isSessionAnalysisToggling,isGithubIssuesToggling,isLinearIssuesToggling,isZendeskTicketsToggling,isPgAnalyzeIssuesToggling,isErrorTrackingToggling,+ isHealthChecksToggling,} = useValues(signalSourcesLogic)const {toggleSessionAnalysis,@@ -160,6 +162,7 @@ export function SourcesList(): JSX.Element {clearSessionAnalysisFilters,initiateDataWarehouseSourceToggle,toggleErrorTracking,+ toggleHealthChecks,} = useActions(signalSourcesLogic)const recordingFilters = sessionAnalysisConfig?.config?.recording_filters@@ -208,6 +211,16 @@ export function SourcesList(): JSX.Element {onToggle={() => toggleErrorTracking()}/>+ <Source+ icon={<IconHeartPlus className="size-5 text-danger" />}+ title="PostHog Health checks"+ description="Instrumentation issues — missing events, proxy gaps, outdated SDKs → Signals"+ variant="available"+ checked={!!healthChecksConfig?.enabled}+ loading={isHealthChecksToggling}+ onToggle={() => toggleHealthChecks()}+ />+<Sourceicon={<img className="size-5" src={iconZendesk} />}title="Zendesk"diff --git a/frontend/src/scenes/inbox/signalSourcesLogic.ts b/frontend/src/scenes/inbox/signalSourcesLogic.tsindex 0c6a1c77da14..f796bb7643c5 100644--- a/frontend/src/scenes/inbox/signalSourcesLogic.ts+++ b/frontend/src/scenes/inbox/signalSourcesLogic.ts@@ -137,6 +137,7 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([toggleSignalSourceFailure: (params: ToggleSignalSourceParams, error: string) => ({ params, error }),toggleErrorTracking: true,toggleErrorTrackingComplete: true,+ toggleHealthChecks: true,saveSessionAnalysisFilters: (filters: RecordingUniversalFilters) => ({ filters }),clearSessionAnalysisFilters: true,}),@@ -188,6 +189,8 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([const { sourceProduct, sourceType } = DATA_WAREHOUSE_SOURCE_CONFIG[dwSource]return toggleSourceConfigState(state, sourceProduct, sourceType)},+ toggleHealthChecks: (state: SignalSourceConfig[] | null) =>+ toggleSourceConfigState(state, SignalSourceProduct.HEALTH_CHECKS, SignalSourceType.HEALTH_ISSUE),},togglingSourceKeys: [new Set<string>(),@@ -285,6 +288,20 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([(s) => [s.togglingSourceKeys],(keys: Set<string>): boolean => keys.has('error_tracking'),],+ healthChecksConfig: [+ (s) => [s.sourceConfigs],+ (sourceConfigs: SignalSourceConfig[] | null): SignalSourceConfig | null =>+ sourceConfigs?.find(+ (c) =>+ c.source_product === SignalSourceProduct.HEALTH_CHECKS &&+ c.source_type === SignalSourceType.HEALTH_ISSUE+ ) ?? null,+ ],+ isHealthChecksToggling: [+ (s) => [s.togglingSourceKeys],+ (keys: Set<string>): boolean =>+ keys.has(`${SignalSourceProduct.HEALTH_CHECKS}_${SignalSourceType.HEALTH_ISSUE}`),+ ],errorTrackingIsFullyEnabled: [(s) => [s.sourceConfigs],(sourceConfigs: SignalSourceConfig[] | null): boolean => {@@ -446,6 +463,17 @@ export const signalSourcesLogic = kea<signalSourcesLogicType>([enabled: desiredEnabled,})},+ toggleHealthChecks: () => {+ // The optimistic reducer flips the config before this listener runs,+ // so config.enabled already reflects the desired state.+ const config = values.healthChecksConfig+ const desiredEnabled = config?.enabled ?? true+ actions.toggleSignalSource({+ sourceProduct: SignalSourceProduct.HEALTH_CHECKS,+ sourceType: SignalSourceType.HEALTH_ISSUE,+ enabled: desiredEnabled,+ })+ },toggleDataWarehouseSource: ({ dwSource }) => {const { sourceProduct, sourceType } = DATA_WAREHOUSE_SOURCE_CONFIG[dwSource]const config = getDataWarehouseSourceConfig(values, dwSource)diff --git a/posthog/schema.py b/posthog/schema.pyindex 4053c5c61011..2a48d3195340 100644--- a/posthog/schema.py+++ b/posthog/schema.py@@ -116,6 +116,7 @@ from posthog.schema_enums import (GoogleAdsTableExclusions as GoogleAdsTableExclusions,GoogleAdsTableKeywords as GoogleAdsTableKeywords,GradientScaleMode as GradientScaleMode,+ HealthCheckSeverity as HealthCheckSeverity,HeatmapSortOrder as HeatmapSortOrder,HedgehogActorAccessoryOption as HedgehogActorAccessoryOption,HedgehogActorColorOption as HedgehogActorColorOption,@@ -1450,6 +1451,20 @@ class GoalLine(BaseModel):value: float+class HealthCheckSignalExtra(BaseModel):+ model_config = ConfigDict(+ extra="forbid",+ )+ issue_id: str+ kind: str+ link: str = Field(..., description="Relative in-app path to the resource, e.g. '/web'.")+ payload: dict[str, Any]+ severity: HealthCheckSeverity+ summary: str+ title: str+ url: str = Field(..., description="Absolute URL ({project.url} + link).")++class HeatmapGradientStop(BaseModel):model_config = ConfigDict(extra="forbid",@@ -5132,6 +5147,19 @@ class GroupPropertyFilter(BaseModel):value: list[str | float | bool] | str | float | bool | None = None+class HealthCheckSignalInput(BaseModel):+ model_config = ConfigDict(+ extra="forbid",+ )+ description: str+ extra: HealthCheckSignalExtra+ remediation: SignalRemediation | None = None+ source_id: str+ source_product: Literal["health_checks"] = "health_checks"+ source_type: Literal["health_issue"] = "health_issue"+ weight: float++class HeatmapSettings(BaseModel):model_config = ConfigDict(extra="forbid",@@ -6627,6 +6655,7 @@ class SignalInput(| PgAnalyzeIssueSignalInput| SignalsScoutSignalInput| LogsAlertStateChangeSignalInput+ | HealthCheckSignalInput]):root: (@@ -6642,6 +6671,7 @@ class SignalInput(| PgAnalyzeIssueSignalInput| SignalsScoutSignalInput| LogsAlertStateChangeSignalInput+ | HealthCheckSignalInput)diff --git a/posthog/schema_enums.py b/posthog/schema_enums.pyindex 84e2c85e8b67..4b06c10d5f6b 100644--- a/posthog/schema_enums.py+++ b/posthog/schema_enums.py@@ -1940,6 +1940,12 @@ class GoogleAdsTableKeywords(StrEnum):CAMPAIGN = "campaign"+class HealthCheckSeverity(StrEnum):+ CRITICAL = "critical"+ WARNING = "warning"+ INFO = "info"++class GradientScaleMode(StrEnum):ABSOLUTE = "absolute"RELATIVE = "relative"@@ -2935,6 +2941,7 @@ class SignalSourceProduct(StrEnum):PGANALYZE = "pganalyze"SIGNALS_SCOUT = "signals_scout"LOGS = "logs"+ HEALTH_CHECKS = "health_checks"class SignalSourceType(StrEnum):@@ -2950,6 +2957,7 @@ class SignalSourceType(StrEnum):ENDPOINT_EXECUTION_FAILED = "endpoint_execution_failed"CROSS_SOURCE_ISSUE = "cross_source_issue"ALERT_STATE_CHANGE = "alert_state_change"+ HEALTH_ISSUE = "health_issue"class Severity(StrEnum):diff --git a/posthog/temporal/health_checks/framework.py b/posthog/temporal/health_checks/framework.pyindex dd091fc51f0e..62be1f12f129 100644--- a/posthog/temporal/health_checks/framework.py+++ b/posthog/temporal/health_checks/framework.py@@ -2,16 +2,34 @@ from __future__ import annotationsimport inspectfrom dataclasses import dataclass-from typing import TYPE_CHECKING+from typing import Any++from django.conf import settings++from posthog.schema import Priorityfrom posthog.clickhouse.query_tagging import Productfrom posthog.dags.common.owners import JobOwners+from posthog.models.health_issue import HealthIssuefrom posthog.temporal.health_checks.detectors import DEFAULT_EXECUTION_POLICY, HealthExecutionPolicyfrom posthog.temporal.health_checks.models import DEFAULT_ACTIVE_SINCE_DAYS, HealthCheckResultfrom posthog.temporal.health_checks.registry import _DETECT_FNS, HEALTH_CHECKS, ensure_registry_loaded-if TYPE_CHECKING:- from posthog.models.health_issue import HealthIssue+# Severity → signal weight. Critical issues hit weight 1.0, which triggers the+# Signals summary pipeline; lower severities rank below in the inbox feed.+_SEVERITY_WEIGHT: dict[str, float] = {+ HealthIssue.Severity.CRITICAL: 1.0,+ HealthIssue.Severity.WARNING: 0.7,+ HealthIssue.Severity.INFO: 0.4,+}++# Severity → suggested report priority, carried on a signal's remediation. Kept beside+# `_SEVERITY_WEIGHT` so the two severity mappings stay in sync.+_SEVERITY_PRIORITY: dict[str, Priority] = {+ HealthIssue.Severity.CRITICAL: Priority.P1,+ HealthIssue.Severity.WARNING: Priority.P2,+ HealthIssue.Severity.INFO: Priority.P3,+}@dataclass(frozen=True)@@ -54,6 +72,72 @@ class Remediation:object.__setattr__(self, "agent", inspect.cleandoc(self.agent))+@dataclass(frozen=True)+class SignalContent:+ """An inbox signal rendered from a newly-firing health issue.++ Checks opt into the Signals inbox by overriding `HealthCheck.render_signal`+ to return one of these. `description` is what a reviewer reads in the feed;+ `weight` ranks it (see `_SEVERITY_WEIGHT`); `extra` is product metadata that+ must satisfy the `health_checks`/`health_issue` schema variant in+ `frontend/src/queries/schema/schema-signals.ts`.++ The signal's remediation is not carried here — it's the check's static+ `Remediation` (human/agent), which the signal emitter reads directly and+ maps onto the signal's top-level `remediation` field.+ """++ description: str+ weight: float+ extra: dict[str, Any]+++# Bounds on `issue.payload` before it lands in a signal's `extra`, which the Signals pipeline+# renders verbatim into LLM context — an unbounded check payload must not blow up the prompt.+_MAX_PAYLOAD_LIST_ITEMS = 20+_MAX_PAYLOAD_STR_LEN = 500+_MAX_PAYLOAD_DEPTH = 3+++def _bounded_payload_value(value: Any, depth: int = 0) -> Any:+ """Recursively cap list length, string length, and nesting depth of a payload value."""+ if isinstance(value, str):+ if len(value) <= _MAX_PAYLOAD_STR_LEN:+ return value+ return f"{value[:_MAX_PAYLOAD_STR_LEN]}… (truncated)"+ if isinstance(value, list):+ if depth >= _MAX_PAYLOAD_DEPTH:+ return f"[{len(value)} items]"+ bounded = [_bounded_payload_value(item, depth + 1) for item in value[:_MAX_PAYLOAD_LIST_ITEMS]]+ if len(value) > _MAX_PAYLOAD_LIST_ITEMS:+ bounded.append(f"… (+{len(value) - _MAX_PAYLOAD_LIST_ITEMS} more)")+ return bounded+ if isinstance(value, dict):+ if depth >= _MAX_PAYLOAD_DEPTH:+ return f"{{{len(value)} keys}}"+ return {key: _bounded_payload_value(item, depth + 1) for key, item in value.items()}+ return value+++def build_signal_extra(issue: HealthIssue, *, title: str, summary: str, link: str) -> dict[str, Any]:+ """Assemble the `extra` envelope for a health-check signal.++ Shape must match the `health_checks`/`health_issue` variant in+ `frontend/src/queries/schema/schema-signals.ts`. `render_signal` overrides+ call this so the envelope stays consistent across checks.+ """+ return {+ "kind": issue.kind,+ "severity": issue.severity,+ "issue_id": str(issue.id),+ "title": title,+ "summary": summary,+ "link": link,+ "url": f"{settings.SITE_URL}{link}",+ "payload": _bounded_payload_value(issue.payload),+ }++@dataclass(frozen=True)class HealthCheckRegistration:name: str@@ -145,6 +229,20 @@ class HealthCheck:link="/health",)+ @classmethod+ def render_signal(cls, issue: HealthIssue) -> SignalContent | None:+ """Build the inbox signal for a newly-firing issue, or None to skip.++ The base default returns None — a check surfaces in the Signals inbox+ only by overriding this and writing its own description / weight / extra.+ Overrides build their own prose rather than reusing `render_alert`: the+ alert phrasing (a destination notification) and the inbox phrasing (a+ reviewer-facing finding) are deliberately separate. Use `_SEVERITY_WEIGHT`+ for the standard severity → weight mapping. The remediation is not set+ here — it comes from the check's static `remediation` constant.+ """+ return None+def health_check_class_for_kind(kind: str) -> type[HealthCheck] | None:"""Resolve the HealthCheck subclass that produces issues of `kind`.diff --git a/posthog/temporal/health_checks/processing.py b/posthog/temporal/health_checks/processing.pyindex e38e2d6dc758..acd0a9f40370 100644--- a/posthog/temporal/health_checks/processing.py+++ b/posthog/temporal/health_checks/processing.py@@ -5,6 +5,7 @@ import structlogfrom posthog.temporal.health_checks.alerts import emit_health_check_alertfrom posthog.temporal.health_checks.db import resolve_stale_issues_with_deltas, upsert_issues_with_deltasfrom posthog.temporal.health_checks.models import BatchDetectFn, BatchResult+from posthog.temporal.health_checks.signal_emitter import emit_health_check_signalsfrom posthog.temporal.health_checks.validation import _validate_batch_outputlogger = structlog.get_logger(__name__)@@ -54,6 +55,7 @@ def _process_batch_detection(for issue in newly_active:emit_health_check_alert(issue, status="firing")+ emit_health_check_signals(newly_active)for issue in newly_resolved:emit_health_check_alert(issue, status="resolved")diff --git a/posthog/temporal/health_checks/signal_emitter.py b/posthog/temporal/health_checks/signal_emitter.pynew file mode 100644index 000000000000..fbf0b9cb78ef--- /dev/null+++ b/posthog/temporal/health_checks/signal_emitter.py@@ -0,0 +1,127 @@+import asyncio+from dataclasses import dataclass++import structlog+from asgiref.sync import async_to_sync++from posthog.schema import SignalRemediation++from posthog.exceptions_capture import capture_exception+from posthog.models import Team+from posthog.models.health_issue import HealthIssue+from posthog.temporal.health_checks.alerts import _check_class_for_kind+from posthog.temporal.health_checks.framework import _SEVERITY_PRIORITY++logger = structlog.get_logger(__name__)++SOURCE_PRODUCT = "health_checks"+SOURCE_TYPE = "health_issue"+++@dataclass(frozen=True)+class _PreparedSignal:+ """A health issue resolved into the arguments `emit_signal` needs."""++ issue: HealthIssue+ description: str+ weight: float+ extra: dict+ remediation: SignalRemediation | None+++def _prepare_signal(issue: HealthIssue) -> _PreparedSignal | None:+ """Resolve a health issue into its signal payload, or None to emit nothing.++ A check opts in by overriding `HealthCheck.render_signal`; checks without an+ override return None and emit nothing. Pure and cheap (no IO). Never raises —+ a single bad issue must not break the orchestrator batch.+ """+ try:+ check_cls = _check_class_for_kind(issue.kind)+ if check_cls is None:+ return None++ content = check_cls.render_signal(issue)+ if content is None: # check didn't opt in+ return None++ # Static human/agent guide, with priority derived from the issue's severity.+ remediation = (+ SignalRemediation(+ human=check_cls.remediation.human,+ agent=check_cls.remediation.agent,+ priority=_SEVERITY_PRIORITY.get(issue.severity),+ )+ if check_cls.remediation is not None+ else None+ )+ return _PreparedSignal(+ issue=issue,+ description=content.description,+ weight=content.weight,+ extra=content.extra,+ remediation=remediation,+ )+ except Exception as e:+ logger.exception("Failed to prepare health-check signal", kind=issue.kind, issue_id=str(issue.id))+ capture_exception(e, additional_properties={"kind": issue.kind, "issue_id": str(issue.id)})+ return None+++def emit_health_check_signals(issues: list[HealthIssue]) -> int:+ """Emit Signals-inbox signals for a batch of newly-firing health issues.++ Returns the number of signals queued. Resolves every issue up front, fetches all+ teams in one query, then fires the emissions concurrently rather than blocking the+ processing thread on each one's serial IO. Never raises — a single bad issue must+ not break the orchestrator batch.+ """+ # Deferred import: keeps the signals product off the core import path and+ # avoids the facade's circular import back into the temporal stack.+ from products.signals.backend.facade.api import emit_signal # noqa: PLC0415++ resolved = (_prepare_signal(issue) for issue in issues)+ prepared = [signal for signal in resolved if signal is not None]+ if not prepared:+ return 0++ # One query for the whole batch, with `organization` joined so `emit_signal` doesn't refetch it.+ teams = Team.objects.select_related("organization").in_bulk([signal.issue.team_id for signal in prepared])++ async def _emit_one(signal: _PreparedSignal) -> bool:+ team = teams.get(signal.issue.team_id)+ if team is None:+ logger.warning(+ "Team missing for health-check signal", issue_id=str(signal.issue.id), team_id=signal.issue.team_id+ )+ return False+ await emit_signal(+ team=team,+ source_product=SOURCE_PRODUCT,+ source_type=SOURCE_TYPE,+ source_id=str(signal.issue.id),+ description=signal.description,+ weight=signal.weight,+ extra=signal.extra,+ remediation=signal.remediation,+ )+ return True++ async def _emit_all() -> list[bool | BaseException]:+ return await asyncio.gather(*(_emit_one(signal) for signal in prepared), return_exceptions=True)++ queued = 0+ for signal, result in zip(prepared, async_to_sync(_emit_all)()):+ if isinstance(result, BaseException):+ logger.exception(+ "Failed to emit health-check signal",+ kind=signal.issue.kind,+ issue_id=str(signal.issue.id),+ exc_info=result,+ )+ capture_exception(+ result, additional_properties={"kind": signal.issue.kind, "issue_id": str(signal.issue.id)}+ )+ elif result:+ queued += 1+ return queueddiff --git a/posthog/temporal/health_checks/tests/test_signal_emitter.py b/posthog/temporal/health_checks/tests/test_signal_emitter.pynew file mode 100644index 000000000000..50869fd6d866--- /dev/null+++ b/posthog/temporal/health_checks/tests/test_signal_emitter.py@@ -0,0 +1,201 @@+from unittest.mock import AsyncMock, MagicMock, patch++from django.test import SimpleTestCase++from parameterized import parameterized++from posthog.schema import HealthCheckSignalExtra, Priority, SignalRemediation++from posthog.models import Team+from posthog.models.health_issue import HealthIssue+from posthog.temporal.health_checks.framework import (+ AlertContent,+ HealthCheck,+ Remediation,+ SignalContent,+ build_signal_extra,+)+from posthog.temporal.health_checks.processing import _process_batch_detection+from posthog.temporal.health_checks.signal_emitter import emit_health_check_signals+++class _SignalCheck(HealthCheck):+ # No name/kind -> __init_subclass__ skips auto-registration.+ remediation = Remediation(+ human="Open the health page and set your authorized URLs.",+ agent="Call `project-settings-update` to set app_urls; verify with `project-get`.",+ )++ @classmethod+ def render_alert(cls, issue: HealthIssue) -> AlertContent:+ return AlertContent(title="stub", summary="stub", link="/web/health")++ @classmethod+ def render_signal(cls, issue: HealthIssue) -> SignalContent | None:+ return SignalContent(+ description="something is wrong with instrumentation",+ weight=0.7,+ extra=build_signal_extra(issue, title="stub", summary="stub", link="/web/health"),+ )+++class _NoSignalCheck(HealthCheck):+ # Inherits the base render_signal -> returns None (opt out).+ @classmethod+ def render_alert(cls, issue: HealthIssue) -> AlertContent:+ return AlertContent(title="stub", summary="stub", link="/health")+++def _make_issue(kind: str = "stub_check", severity: str = "warning") -> HealthIssue:+ return HealthIssue(team_id=42, kind=kind, severity=severity, payload={"detail": "x"}, unique_hash="h")+++class TestBaseRenderSignal(SimpleTestCase):+ def test_base_render_signal_returns_none(self):+ assert _NoSignalCheck.render_signal(_make_issue()) is None+++class TestBuildSignalExtra(SimpleTestCase):+ def test_extra_satisfies_signal_schema(self):+ # emit_signal validates extra against this variant; if the envelope drifts+ # from the schema, every emit fails validation.+ issue = _make_issue(severity="critical")+ extra = build_signal_extra(issue, title="t", summary="s", link="/web/health")+ HealthCheckSignalExtra.model_validate(extra)+ assert extra["kind"] == "stub_check"+ assert extra["severity"] == "critical"+ assert extra["issue_id"] == str(issue.id)+ assert extra["url"].endswith("/web/health")+ assert "remediation" not in extra++ def test_payload_lists_and_strings_are_bounded(self):+ # An unbounded check payload (e.g. one entry per distinct $lib_version) must not flow+ # verbatim into the signal's extra, which the research agent renders into LLM context.+ issue = HealthIssue(+ team_id=42,+ kind="stub_check",+ severity="warning",+ payload={"usage": [f"1.{n}.0" for n in range(100)], "note": "x" * 1000},+ unique_hash="h",+ )+ extra = build_signal_extra(issue, title="t", summary="s", link="/web/health")+ HealthCheckSignalExtra.model_validate(extra)+ bounded_usage = extra["payload"]["usage"]+ assert len(bounded_usage) == 21 # 20 items + one "+N more" marker+ assert "more" in bounded_usage[-1]+ assert extra["payload"]["note"].endswith("… (truncated)")+++def _patch_in_bulk(team_model: MagicMock, teams_by_id: dict[int, Team]) -> None:+ # Mirror `Team.objects.select_related("organization").in_bulk([...])`.+ team_model.objects.select_related.return_value.in_bulk.return_value = teams_by_id+++class TestEmitHealthCheckSignals(SimpleTestCase):+ def test_calls_emit_signal_with_weight_and_extra(self):+ emit_mock = AsyncMock()+ team = MagicMock(spec=Team)+ with (+ patch("posthog.temporal.health_checks.signal_emitter._check_class_for_kind", return_value=_SignalCheck),+ patch("products.signals.backend.facade.api.emit_signal", new=emit_mock),+ patch("posthog.temporal.health_checks.signal_emitter.Team") as team_model,+ ):+ issue = _make_issue()+ _patch_in_bulk(team_model, {issue.team_id: team})+ queued = emit_health_check_signals([issue])++ assert queued == 1+ kwargs = emit_mock.call_args.kwargs+ assert kwargs["team"] is team+ assert kwargs["source_product"] == "health_checks"+ assert kwargs["source_type"] == "health_issue"+ assert kwargs["source_id"] == str(issue.id)+ assert kwargs["weight"] == 0.7+ assert kwargs["extra"]["kind"] == "stub_check"+ assert kwargs["remediation"] == SignalRemediation(+ human="Open the health page and set your authorized URLs.",+ agent="Call `project-settings-update` to set app_urls; verify with `project-get`.",+ priority=Priority.P2, # derived from the issue's "warning" severity+ )++ def test_emits_for_every_issue_in_the_batch(self):+ emit_mock = AsyncMock()+ with (+ patch("posthog.temporal.health_checks.signal_emitter._check_class_for_kind", return_value=_SignalCheck),+ patch("products.signals.backend.facade.api.emit_signal", new=emit_mock),+ patch("posthog.temporal.health_checks.signal_emitter.Team") as team_model,+ ):+ issues = [_make_issue(), _make_issue()]+ _patch_in_bulk(team_model, {issues[0].team_id: MagicMock(spec=Team)})+ queued = emit_health_check_signals(issues)++ assert queued == 2+ assert emit_mock.await_count == 2++ def test_empty_batch_emits_nothing(self):+ emit_mock = AsyncMock()+ with (+ patch("products.signals.backend.facade.api.emit_signal", new=emit_mock),+ patch("posthog.temporal.health_checks.signal_emitter.Team") as team_model,+ ):+ queued = emit_health_check_signals([])++ assert queued == 0+ emit_mock.assert_not_called()+ team_model.objects.select_related.assert_not_called()++ def test_check_without_override_emits_nothing(self):+ emit_mock = AsyncMock()+ with (+ patch("posthog.temporal.health_checks.signal_emitter._check_class_for_kind", return_value=_NoSignalCheck),+ patch("products.signals.backend.facade.api.emit_signal", new=emit_mock),+ ):+ queued = emit_health_check_signals([_make_issue()])++ assert queued == 0+ emit_mock.assert_not_called()++ def test_unregistered_kind_emits_nothing(self):+ emit_mock = AsyncMock()+ with (+ patch("posthog.temporal.health_checks.signal_emitter._check_class_for_kind", return_value=None),+ patch("products.signals.backend.facade.api.emit_signal", new=emit_mock),+ ):+ queued = emit_health_check_signals([_make_issue(kind="not_in_registry")])++ assert queued == 0+ emit_mock.assert_not_called()++ def test_emit_signal_failure_is_swallowed_and_captured(self):+ emit_mock = AsyncMock(side_effect=RuntimeError("temporal down"))+ with (+ patch("posthog.temporal.health_checks.signal_emitter._check_class_for_kind", return_value=_SignalCheck),+ patch("products.signals.backend.facade.api.emit_signal", new=emit_mock),+ patch("posthog.temporal.health_checks.signal_emitter.Team") as team_model,+ patch("posthog.temporal.health_checks.signal_emitter.capture_exception") as capture,+ ):+ issue = _make_issue()+ _patch_in_bulk(team_model, {issue.team_id: MagicMock(spec=Team)})+ queued = emit_health_check_signals([issue])++ assert queued == 0+ capture.assert_called_once()+++class TestSeamEmitsSignalsOnFiringOnly(SimpleTestCase):+ @parameterized.expand([("dry_run_off", False)])+ def test_signal_emitted_for_newly_active_not_resolved(self, _name: str, dry_run: bool):+ firing = _make_issue(kind="k")+ resolved = _make_issue(kind="k")++ with (+ patch("posthog.temporal.health_checks.processing.upsert_issues_with_deltas", return_value=[firing]),+ patch(+ "posthog.temporal.health_checks.processing.resolve_stale_issues_with_deltas", return_value=[resolved]+ ),+ patch("posthog.temporal.health_checks.processing.emit_health_check_alert"),+ patch("posthog.temporal.health_checks.processing.emit_health_check_signals") as emit_signals,+ ):+ _process_batch_detection([42], "k", lambda team_ids: {}, dry_run=dry_run)++ emit_signals.assert_called_once_with([firing])diff --git a/products/cdp/backend/temporal/health_checks/ingestion_warnings.py b/products/cdp/backend/temporal/health_checks/ingestion_warnings.pyindex 55f18ddbf917..7f8bf7950cc3 100644--- a/products/cdp/backend/temporal/health_checks/ingestion_warnings.py+++ b/products/cdp/backend/temporal/health_checks/ingestion_warnings.py@@ -3,7 +3,14 @@ import structlogfrom posthog.dags.common.owners import JobOwnersfrom posthog.models.health_issue import HealthIssuefrom posthog.temporal.health_checks.detectors import CLICKHOUSE_BATCH_EXECUTION_POLICY-from posthog.temporal.health_checks.framework import AlertContent, HealthCheck, Remediation+from posthog.temporal.health_checks.framework import (+ _SEVERITY_WEIGHT,+ AlertContent,+ HealthCheck,+ Remediation,+ SignalContent,+ build_signal_extra,+)from posthog.temporal.health_checks.models import HealthCheckResultfrom posthog.temporal.health_checks.query import execute_clickhouse_health_team_query@@ -73,6 +80,24 @@ class IngestionWarningsCheck(HealthCheck):link="/health/ingestion",)+ @classmethod+ def render_signal(cls, issue: HealthIssue) -> SignalContent | None:+ warning_type = issue.payload.get("warning_type", "ingestion warning")+ count = issue.payload.get("affected_count")+ count_clause = f"{count:,} times" if isinstance(count, int) else "repeatedly"+ title = "Ingestion warning detected"+ summary = f"{warning_type} fired {count} times" if count is not None else f"{warning_type} detected"+ return SignalContent(+ description=(+ f"PostHog raised the ingestion warning `{warning_type}` {count_clause} for this project in the last "+ "week. Ingestion warnings mean events are being dropped, mis-merged, or degraded on the way in — so "+ "the affected data is incomplete or inaccurate. Recommend reviewing the ingestion warnings page to "+ "find the source and fix the instrumentation producing them."+ ),+ weight=_SEVERITY_WEIGHT[issue.severity],+ extra=build_signal_extra(issue, title=title, summary=summary, link="/health/ingestion"),+ )+def detect(self, team_ids: list[int]) -> dict[int, list[HealthCheckResult]]:rows = execute_clickhouse_health_team_query(INGESTION_WARNINGS_SQL,diff --git a/products/data_warehouse/backend/temporal/health_checks/materialized_view_failure.py b/products/data_warehouse/backend/temporal/health_checks/materialized_view_failure.pyindex f4ca78cb92d7..ccaadc9a2902 100644--- a/products/data_warehouse/backend/temporal/health_checks/materialized_view_failure.py+++ b/products/data_warehouse/backend/temporal/health_checks/materialized_view_failure.py@@ -3,7 +3,14 @@ from django.db.models import Qfrom posthog.dags.common.owners import JobOwnersfrom posthog.models.health_issue import HealthIssuefrom posthog.temporal.health_checks.detectors import DEFAULT_EXECUTION_POLICY-from posthog.temporal.health_checks.framework import AlertContent, HealthCheck, Remediation+from posthog.temporal.health_checks.framework import (+ _SEVERITY_WEIGHT,+ AlertContent,+ HealthCheck,+ Remediation,+ SignalContent,+ build_signal_extra,+)from posthog.temporal.health_checks.models import HealthCheckResultfrom products.data_modeling.backend.models.datawarehouse_saved_query import DataWarehouseSavedQuery@@ -44,6 +51,23 @@ class MaterializedViewFailureCheck(HealthCheck):link="/health/data_modeling",)+ @classmethod+ def render_signal(cls, issue: HealthIssue) -> SignalContent | None:+ name = issue.payload.get("pipeline_name", "a materialized view")+ error = (issue.payload.get("error") or "").strip()+ error_clause = f' Latest error: "{error}".' if error else ""+ title = "Materialized view failed"+ summary = f"{name} failed to refresh"+ return SignalContent(+ description=(+ f'The materialized view "{name}" failed to refresh for this project, so queries and insights '+ f"reading from it are serving stale data.{error_clause} Recommend opening the model, reviewing the "+ "error, and re-running the materialization once the underlying query is fixed."+ ),+ weight=_SEVERITY_WEIGHT[issue.severity],+ extra=build_signal_extra(issue, title=title, summary=summary, link="/health/data_modeling"),+ )+def detect(self, team_ids: list[int]) -> dict[int, list[HealthCheckResult]]:queryset = (DataWarehouseSavedQuery.objects.filter(diff --git a/products/growth/backend/temporal/health_checks/sdk_outdated.py b/products/growth/backend/temporal/health_checks/sdk_outdated.pyindex 237671507ff9..b8ea03b24ef2 100644--- a/products/growth/backend/temporal/health_checks/sdk_outdated.py+++ b/products/growth/backend/temporal/health_checks/sdk_outdated.py@@ -8,7 +8,14 @@ from posthog.dags.common.owners import JobOwnersfrom posthog.models.health_issue import HealthIssuefrom posthog.redis import get_clientfrom posthog.temporal.health_checks.detectors import HealthExecutionPolicy-from posthog.temporal.health_checks.framework import AlertContent, HealthCheck, Remediation+from posthog.temporal.health_checks.framework import (+ _SEVERITY_WEIGHT,+ AlertContent,+ HealthCheck,+ Remediation,+ SignalContent,+ build_signal_extra,+)from posthog.temporal.health_checks.models import HealthCheckResultfrom posthog.temporal.health_checks.query import execute_clickhouse_health_team_query@@ -138,6 +145,23 @@ class SdkOutdatedCheck(HealthCheck):link="/health/sdk-health",)+ @classmethod+ def render_signal(cls, issue: HealthIssue) -> SignalContent | None:+ sdk_name = issue.payload.get("sdk_name", "An SDK")+ # `reason` is the assessment's allowlist-safe source of truth (see render_alert) — safe to+ # forward verbatim. It names the in-use and target versions driving the issue.+ reason = issue.payload.get("reason") or f"{sdk_name} is behind the latest release."+ title = f"{sdk_name} SDK is outdated"+ return SignalContent(+ description=(+ f"The {sdk_name} SDK is outdated for this project. {reason} "+ "Outdated SDKs miss bug fixes, performance improvements, and new features, and may "+ "carry known issues. Recommend upgrading to the latest version."+ ),+ weight=_SEVERITY_WEIGHT[issue.severity],+ extra=build_signal_extra(issue, title=title, summary=reason, link="/health/sdk-health"),+ )+def detect(self, team_ids: list[int]) -> dict[int, list[HealthCheckResult]]:github_data = _load_github_sdk_data()if not github_data:diff --git a/products/signals/backend/migrations/0038_alter_signalsourceconfig_source_product_and_more.py b/products/signals/backend/migrations/0038_alter_signalsourceconfig_source_product_and_more.pynew file mode 100644index 000000000000..48d31125d9d8--- /dev/null+++ b/products/signals/backend/migrations/0038_alter_signalsourceconfig_source_product_and_more.py@@ -0,0 +1,51 @@+# Generated by Django 5.2.14 on 2026-06-05 22:33++from django.db import migrations, models+++class Migration(migrations.Migration):+ dependencies = [+ ("signals", "0037_signalscoutemission_tags"),+ ]++ operations = [+ migrations.AlterField(+ model_name="signalsourceconfig",+ name="source_product",+ field=models.CharField(+ choices=[+ ("session_replay", "Session replay"),+ ("llm_analytics", "LLM analytics"),+ ("github", "GitHub"),+ ("linear", "Linear"),+ ("zendesk", "Zendesk"),+ ("conversations", "Conversations"),+ ("error_tracking", "Error tracking"),+ ("pganalyze", "pganalyze"),+ ("signals_scout", "Signals scout"),+ ("logs", "Logs"),+ ("health_checks", "Health checks"),+ ],+ max_length=100,+ ),+ ),+ migrations.AlterField(+ model_name="signalsourceconfig",+ name="source_type",+ field=models.CharField(+ choices=[+ ("session_analysis_cluster", "Session analysis cluster"),+ ("evaluation", "Evaluation"),+ ("issue", "Issue"),+ ("ticket", "Ticket"),+ ("issue_created", "Issue created"),+ ("issue_reopened", "Issue reopened"),+ ("issue_spiking", "Issue spiking"),+ ("cross_source_issue", "Cross source issue"),+ ("alert_state_change", "Alert state change"),+ ("health_issue", "Health issue"),+ ],+ max_length=100,+ ),+ ),+ ]diff --git a/products/signals/backend/migrations/max_migration.txt b/products/signals/backend/migrations/max_migration.txtindex a547de6422ab..102b197a4652 100644--- a/products/signals/backend/migrations/max_migration.txt+++ b/products/signals/backend/migrations/max_migration.txt@@ -1 +1 @@-0037_signalscoutemission_tags+0038_alter_signalsourceconfig_source_product_and_morediff --git a/products/signals/backend/models.py b/products/signals/backend/models.pyindex 0377b8b6f0da..a4f8ec915666 100644--- a/products/signals/backend/models.py+++ b/products/signals/backend/models.py@@ -28,6 +28,7 @@ class SignalSourceConfig(UUIDModel):PGANALYZE = "pganalyze", "pganalyze"SIGNALS_SCOUT = "signals_scout", "Signals scout"LOGS = "logs", "Logs"+ HEALTH_CHECKS = "health_checks", "Health checks"class SourceType(models.TextChoices):SESSION_ANALYSIS_CLUSTER = "session_analysis_cluster", "Session analysis cluster"@@ -39,6 +40,7 @@ class SignalSourceConfig(UUIDModel):ISSUE_SPIKING = "issue_spiking", "Issue spiking"CROSS_SOURCE_ISSUE = "cross_source_issue", "Cross source issue"ALERT_STATE_CHANGE = "alert_state_change", "Alert state change"+ HEALTH_ISSUE = "health_issue", "Health issue"team = models.ForeignKey("posthog.Team", on_delete=models.CASCADE, related_name="signal_source_configs")source_product = models.CharField(max_length=100, choices=SourceProduct)diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.tsindex ca509b2aba2a..30f0590652e8 100644--- a/products/signals/frontend/generated/api.schemas.ts+++ b/products/signals/frontend/generated/api.schemas.ts@@ -1147,6 +1147,7 @@ export interface ForgetResponseApi {* * `pganalyze` - pganalyze* * `signals_scout` - Signals scout* * `logs` - Logs+ * * `health_checks` - Health checks*/export type SourceProductEnumApi = (typeof SourceProductEnumApi)[keyof typeof SourceProductEnumApi]@@ -1161,6 +1162,7 @@ export const SourceProductEnumApi = {Pganalyze: 'pganalyze',SignalsScout: 'signals_scout',Logs: 'logs',+ HealthChecks: 'health_checks',} as const/**@@ -1173,6 +1175,7 @@ export const SourceProductEnumApi = {* * `issue_spiking` - Issue spiking* * `cross_source_issue` - Cross source issue* * `alert_state_change` - Alert state change+ * * `health_issue` - Health issue*/export type SignalSourceConfigSourceTypeEnumApi =(typeof SignalSourceConfigSourceTypeEnumApi)[keyof typeof SignalSourceConfigSourceTypeEnumApi]@@ -1187,6 +1190,7 @@ export const SignalSourceConfigSourceTypeEnumApi = {IssueSpiking: 'issue_spiking',CrossSourceIssue: 'cross_source_issue',AlertStateChange: 'alert_state_change',+ HealthIssue: 'health_issue',} as constexport interface SignalSourceConfigApi {diff --git a/products/signals/frontend/generated/api.zod.ts b/products/signals/frontend/generated/api.zod.tsindex 7cc359d9cb74..1d58c413414e 100644--- a/products/signals/frontend/generated/api.zod.ts+++ b/products/signals/frontend/generated/api.zod.ts@@ -279,9 +279,10 @@ export const SignalsSourceConfigsCreateBody = /* @__PURE__ */ zod.object({'pganalyze','signals_scout','logs',+ 'health_checks',]).describe(- '\* `session_replay` - Session replay\n\* `llm_analytics` - LLM analytics\n\* `github` - GitHub\n\* `linear` - Linear\n\* `zendesk` - Zendesk\n\* `conversations` - Conversations\n\* `error_tracking` - Error tracking\n\* `pganalyze` - pganalyze\n\* `signals_scout` - Signals scout\n\* `logs` - Logs'+ '\* `session_replay` - Session replay\n\* `llm_analytics` - LLM analytics\n\* `github` - GitHub\n\* `linear` - Linear\n\* `zendesk` - Zendesk\n\* `conversations` - Conversations\n\* `error_tracking` - Error tracking\n\* `pganalyze` - pganalyze\n\* `signals_scout` - Signals scout\n\* `logs` - Logs\n\* `health_checks` - Health checks'),source_type: zod.enum([@@ -294,9 +295,10 @@ export const SignalsSourceConfigsCreateBody = /* @__PURE__ */ zod.object({'issue_spiking','cross_source_issue','alert_state_change',+ 'health_issue',]).describe(- '\* `session_analysis_cluster` - Session analysis cluster\n\* `evaluation` - Evaluation\n\* `issue` - Issue\n\* `ticket` - Ticket\n\* `issue_created` - Issue created\n\* `issue_reopened` - Issue reopened\n\* `issue_spiking` - Issue spiking\n\* `cross_source_issue` - Cross source issue\n\* `alert_state_change` - Alert state change'+ '\* `session_analysis_cluster` - Session analysis cluster\n\* `evaluation` - Evaluation\n\* `issue` - Issue\n\* `ticket` - Ticket\n\* `issue_created` - Issue created\n\* `issue_reopened` - Issue reopened\n\* `issue_spiking` - Issue spiking\n\* `cross_source_issue` - Cross source issue\n\* `alert_state_change` - Alert state change\n\* `health_issue` - Health issue'),enabled: zod.boolean().optional(),config: zod.unknown().optional(),@@ -315,9 +317,10 @@ export const SignalsSourceConfigsUpdateBody = /* @__PURE__ */ zod.object({'pganalyze','signals_scout','logs',+ 'health_checks',]).describe(- '\* `session_replay` - Session replay\n\* `llm_analytics` - LLM analytics\n\* `github` - GitHub\n\* `linear` - Linear\n\* `zendesk` - Zendesk\n\* `conversations` - Conversations\n\* `error_tracking` - Error tracking\n\* `pganalyze` - pganalyze\n\* `signals_scout` - Signals scout\n\* `logs` - Logs'+ '\* `session_replay` - Session replay\n\* `llm_analytics` - LLM analytics\n\* `github` - GitHub\n\* `linear` - Linear\n\* `zendesk` - Zendesk\n\* `conversations` - Conversations\n\* `error_tracking` - Error tracking\n\* `pganalyze` - pganalyze\n\* `signals_scout` - Signals scout\n\* `logs` - Logs\n\* `health_checks` - Health checks'),source_type: zod.enum([@@ -330,9 +333,10 @@ export const SignalsSourceConfigsUpdateBody = /* @__PURE__ */ zod.object({'issue_spiking','cross_source_issue','alert_state_change',+ 'health_issue',]).describe(- '\* `session_analysis_cluster` - Session analysis cluster\n\* `evaluation` - Evaluation\n\* `issue` - Issue\n\* `ticket` - Ticket\n\* `issue_created` - Issue created\n\* `issue_reopened` - Issue reopened\n\* `issue_spiking` - Issue spiking\n\* `cross_source_issue` - Cross source issue\n\* `alert_state_change` - Alert state change'+ '\* `session_analysis_cluster` - Session analysis cluster\n\* `evaluation` - Evaluation\n\* `issue` - Issue\n\* `ticket` - Ticket\n\* `issue_created` - Issue created\n\* `issue_reopened` - Issue reopened\n\* `issue_spiking` - Issue spiking\n\* `cross_source_issue` - Cross source issue\n\* `alert_state_change` - Alert state change\n\* `health_issue` - Health issue'),enabled: zod.boolean().optional(),config: zod.unknown().optional(),@@ -351,10 +355,11 @@ export const SignalsSourceConfigsPartialUpdateBody = /* @__PURE__ */ zod.object('pganalyze','signals_scout','logs',+ 'health_checks',]).optional().describe(- '\* `session_replay` - Session replay\n\* `llm_analytics` - LLM analytics\n\* `github` - GitHub\n\* `linear` - Linear\n\* `zendesk` - Zendesk\n\* `conversations` - Conversations\n\* `error_tracking` - Error tracking\n\* `pganalyze` - pganalyze\n\* `signals_scout` - Signals scout\n\* `logs` - Logs'+ '\* `session_replay` - Session replay\n\* `llm_analytics` - LLM analytics\n\* `github` - GitHub\n\* `linear` - Linear\n\* `zendesk` - Zendesk\n\* `conversations` - Conversations\n\* `error_tracking` - Error tracking\n\* `pganalyze` - pganalyze\n\* `signals_scout` - Signals scout\n\* `logs` - Logs\n\* `health_checks` - Health checks'),source_type: zod.enum([@@ -367,10 +372,11 @@ export const SignalsSourceConfigsPartialUpdateBody = /* @__PURE__ */ zod.object('issue_spiking','cross_source_issue','alert_state_change',+ 'health_issue',]).optional().describe(- '\* `session_analysis_cluster` - Session analysis cluster\n\* `evaluation` - Evaluation\n\* `issue` - Issue\n\* `ticket` - Ticket\n\* `issue_created` - Issue created\n\* `issue_reopened` - Issue reopened\n\* `issue_spiking` - Issue spiking\n\* `cross_source_issue` - Cross source issue\n\* `alert_state_change` - Alert state change'+ '\* `session_analysis_cluster` - Session analysis cluster\n\* `evaluation` - Evaluation\n\* `issue` - Issue\n\* `ticket` - Ticket\n\* `issue_created` - Issue created\n\* `issue_reopened` - Issue reopened\n\* `issue_spiking` - Issue spiking\n\* `cross_source_issue` - Cross source issue\n\* `alert_state_change` - Alert state change\n\* `health_issue` - Health issue'),enabled: zod.boolean().optional(),config: zod.unknown().optional(),diff --git a/products/web_analytics/backend/temporal/health_checks/authorized_urls.py b/products/web_analytics/backend/temporal/health_checks/authorized_urls.pyindex ec26f7e2711c..dbd2bc0c376f 100644--- a/products/web_analytics/backend/temporal/health_checks/authorized_urls.py+++ b/products/web_analytics/backend/temporal/health_checks/authorized_urls.py@@ -4,7 +4,14 @@ from posthog.dags.common.owners import JobOwnersfrom posthog.models.health_issue import HealthIssuefrom posthog.models.team import Teamfrom posthog.temporal.health_checks.detectors import DEFAULT_EXECUTION_POLICY-from posthog.temporal.health_checks.framework import AlertContent, HealthCheck, Remediation+from posthog.temporal.health_checks.framework import (+ _SEVERITY_WEIGHT,+ AlertContent,+ HealthCheck,+ Remediation,+ SignalContent,+ build_signal_extra,+)from posthog.temporal.health_checks.models import HealthCheckResult@@ -46,6 +53,20 @@ class AuthorizedUrlsCheck(HealthCheck):link="/web/health",)+ @classmethod+ def render_signal(cls, issue: HealthIssue) -> SignalContent | None:+ title = "No authorized URLs configured"+ summary = issue.payload.get("reason", "No authorized URLs configured. Some filters won't work correctly.")+ return SignalContent(+ description=(+ "This project has no authorized URLs (app URLs) configured. Without them, the toolbar can't "+ "launch on your site and some web-analytics filters won't work correctly. Recommend adding your "+ "site's domains under Project settings → Authorized URLs."+ ),+ weight=_SEVERITY_WEIGHT[issue.severity],+ extra=build_signal_extra(issue, title=title, summary=summary, link="/web/health"),+ )+def detect(self, team_ids: list[int]) -> dict[int, list[HealthCheckResult]]:teams_missing_urls = (Team.objects.filter(diff --git a/products/web_analytics/backend/temporal/health_checks/no_live_events.py b/products/web_analytics/backend/temporal/health_checks/no_live_events.pyindex f483d6da85ba..89b1eae6fb33 100644--- a/products/web_analytics/backend/temporal/health_checks/no_live_events.py+++ b/products/web_analytics/backend/temporal/health_checks/no_live_events.py@@ -2,7 +2,14 @@ from posthog.clickhouse.query_tagging import Productfrom posthog.dags.common.owners import JobOwnersfrom posthog.models.health_issue import HealthIssuefrom posthog.temporal.health_checks.detectors import CLICKHOUSE_BATCH_EXECUTION_POLICY-from posthog.temporal.health_checks.framework import AlertContent, HealthCheck, Remediation+from posthog.temporal.health_checks.framework import (+ _SEVERITY_WEIGHT,+ AlertContent,+ HealthCheck,+ Remediation,+ SignalContent,+ build_signal_extra,+)from posthog.temporal.health_checks.models import HealthCheckResultfrom posthog.temporal.health_checks.query import execute_clickhouse_health_team_query@@ -52,6 +59,22 @@ class NoLiveEventsCheck(HealthCheck):link="/web/health",)+ @classmethod+ def render_signal(cls, issue: HealthIssue) -> SignalContent | None:+ title = "No live events"+ summary = issue.payload.get("reason", "No $pageview or $screen events received recently.")+ return SignalContent(+ description=(+ f"This project hasn't received any `$pageview` or `$screen` events in the last "+ f"{NO_LIVE_EVENTS_LOOKBACK_DAYS} days. That usually means the PostHog snippet/SDK "+ "isn't installed, was removed, or is misconfigured — web and product analytics will "+ "stay empty until capture is restored. Recommend verifying the SDK is initialized "+ "and sending events."+ ),+ weight=_SEVERITY_WEIGHT[issue.severity],+ extra=build_signal_extra(issue, title=title, summary=summary, link="/web/health"),+ )+def detect(self, team_ids: list[int]) -> dict[int, list[HealthCheckResult]]:rows = execute_clickhouse_health_team_query(NO_LIVE_EVENTS_SQL,diff --git a/products/web_analytics/backend/temporal/health_checks/no_pageleave_events.py b/products/web_analytics/backend/temporal/health_checks/no_pageleave_events.pyindex b79545de9c1f..6f6a06bb696d 100644--- a/products/web_analytics/backend/temporal/health_checks/no_pageleave_events.py+++ b/products/web_analytics/backend/temporal/health_checks/no_pageleave_events.py@@ -2,7 +2,14 @@ from posthog.clickhouse.query_tagging import Productfrom posthog.dags.common.owners import JobOwnersfrom posthog.models.health_issue import HealthIssuefrom posthog.temporal.health_checks.detectors import CLICKHOUSE_BATCH_EXECUTION_POLICY-from posthog.temporal.health_checks.framework import AlertContent, HealthCheck, Remediation+from posthog.temporal.health_checks.framework import (+ _SEVERITY_WEIGHT,+ AlertContent,+ HealthCheck,+ Remediation,+ SignalContent,+ build_signal_extra,+)from posthog.temporal.health_checks.models import HealthCheckResultfrom posthog.temporal.health_checks.query import execute_clickhouse_health_team_query@@ -52,6 +59,21 @@ class NoPageleaveEventsCheck(HealthCheck):link="/web/health",)+ @classmethod+ def render_signal(cls, issue: HealthIssue) -> SignalContent | None:+ title = "No $pageleave events"+ summary = issue.payload.get("reason", "$pageview events present but no $pageleave events.")+ return SignalContent(+ description=(+ f"This project is sending `$pageview` events but no `$pageleave` events over the last "+ f"{NO_PAGELEAVE_LOOKBACK_DAYS} days. Missing `$pageleave` breaks bounce rate, session "+ "duration, and scroll-depth metrics in web analytics — it usually means "+ "`capture_pageleave` is disabled in the SDK config. Recommend enabling pageleave capture."+ ),+ weight=_SEVERITY_WEIGHT[issue.severity],+ extra=build_signal_extra(issue, title=title, summary=summary, link="/web/health"),+ )+def detect(self, team_ids: list[int]) -> dict[int, list[HealthCheckResult]]:rows = execute_clickhouse_health_team_query(NO_PAGELEAVE_SQL,diff --git a/products/web_analytics/backend/temporal/health_checks/partial_proxy.py b/products/web_analytics/backend/temporal/health_checks/partial_proxy.pyindex 0999a7b5ad66..7b6ac41b406d 100644--- a/products/web_analytics/backend/temporal/health_checks/partial_proxy.py+++ b/products/web_analytics/backend/temporal/health_checks/partial_proxy.py@@ -4,7 +4,14 @@ from collections import defaultdictfrom posthog.dags.common.owners import JobOwnersfrom posthog.models.health_issue import HealthIssuefrom posthog.temporal.health_checks.detectors import CLICKHOUSE_BATCH_EXECUTION_POLICY-from posthog.temporal.health_checks.framework import AlertContent, HealthCheck, Remediation+from posthog.temporal.health_checks.framework import (+ _SEVERITY_WEIGHT,+ AlertContent,+ HealthCheck,+ Remediation,+ SignalContent,+ build_signal_extra,+)from posthog.temporal.health_checks.models import HealthCheckResultfrom posthog.temporal.health_checks.query import execute_clickhouse_health_team_query@@ -79,6 +86,27 @@ class PartialProxyCheck(HealthCheck):link="/web/health",)+ @classmethod+ def render_signal(cls, issue: HealthIssue) -> SignalContent | None:+ unproxied = issue.payload.get("unproxied_hosts") or []+ hosts_clause = f" ({', '.join(unproxied[:5])})" if unproxied else ""+ title = "Partial reverse-proxy coverage"+ summary = (+ f"{len(unproxied)} host(s) lack a reverse proxy{hosts_clause}"+ if unproxied+ else issue.payload.get("reason", "Reverse proxy is only configured on some hostnames.")+ )+ return SignalContent(+ description=(+ f"This project sends events through a reverse proxy on some hostnames but not others — "+ f"{len(unproxied)} host(s) are unproxied{hosts_clause}. Traffic from the unproxied hosts is "+ "more likely to be blocked by ad blockers and to have inaccurate geolocation, so analytics "+ "will be inconsistent across your domains. Recommend extending the reverse proxy to every host."+ ),+ weight=_SEVERITY_WEIGHT[issue.severity],+ extra=build_signal_extra(issue, title=title, summary=summary, link="/web/health"),+ )+def detect(self, team_ids: list[int]) -> dict[int, list[HealthCheckResult]]:rows = execute_clickhouse_health_team_query(PARTIAL_PROXY_SQL,diff --git a/products/web_analytics/backend/temporal/health_checks/reverse_proxy.py b/products/web_analytics/backend/temporal/health_checks/reverse_proxy.pyindex 25fa8630d33f..fdd5ee559c68 100644--- a/products/web_analytics/backend/temporal/health_checks/reverse_proxy.py+++ b/products/web_analytics/backend/temporal/health_checks/reverse_proxy.py@@ -1,7 +1,14 @@from posthog.dags.common.owners import JobOwnersfrom posthog.models.health_issue import HealthIssuefrom posthog.temporal.health_checks.detectors import CLICKHOUSE_BATCH_EXECUTION_POLICY-from posthog.temporal.health_checks.framework import AlertContent, HealthCheck, Remediation+from posthog.temporal.health_checks.framework import (+ _SEVERITY_WEIGHT,+ AlertContent,+ HealthCheck,+ Remediation,+ SignalContent,+ build_signal_extra,+)from posthog.temporal.health_checks.models import HealthCheckResultfrom posthog.temporal.health_checks.query import execute_clickhouse_health_team_query@@ -52,6 +59,21 @@ class ReverseProxyCheck(HealthCheck):link="/web/health",)+ @classmethod+ def render_signal(cls, issue: HealthIssue) -> SignalContent | None:+ title = "No reverse proxy detected"+ summary = issue.payload.get("reason", "Ad blockers may affect tracking accuracy.")+ return SignalContent(+ description=(+ "PostHog isn't receiving events through a reverse proxy for this project. "+ "Without one, ad blockers can silently drop a meaningful share of "+ "`$pageview` / `$screen` events, undercounting traffic and skewing web analytics. "+ "Recommend serving capture from a first-party domain via a reverse proxy."+ ),+ weight=_SEVERITY_WEIGHT[issue.severity],+ extra=build_signal_extra(issue, title=title, summary=summary, link="/web/health"),+ )+def detect(self, team_ids: list[int]) -> dict[int, list[HealthCheckResult]]:rows = execute_clickhouse_health_team_query(REVERSE_PROXY_SQL,diff --git a/products/web_analytics/backend/temporal/health_checks/scroll_depth.py b/products/web_analytics/backend/temporal/health_checks/scroll_depth.pyindex a74d412d34ac..20af5fa84662 100644--- a/products/web_analytics/backend/temporal/health_checks/scroll_depth.py+++ b/products/web_analytics/backend/temporal/health_checks/scroll_depth.py@@ -1,7 +1,14 @@from posthog.dags.common.owners import JobOwnersfrom posthog.models.health_issue import HealthIssuefrom posthog.temporal.health_checks.detectors import CLICKHOUSE_BATCH_EXECUTION_POLICY-from posthog.temporal.health_checks.framework import AlertContent, HealthCheck, Remediation+from posthog.temporal.health_checks.framework import (+ _SEVERITY_WEIGHT,+ AlertContent,+ HealthCheck,+ Remediation,+ SignalContent,+ build_signal_extra,+)from posthog.temporal.health_checks.models import HealthCheckResultfrom posthog.temporal.health_checks.query import execute_clickhouse_health_team_query@@ -47,6 +54,21 @@ class ScrollDepthCheck(HealthCheck):link="/web/health",)+ @classmethod+ def render_signal(cls, issue: HealthIssue) -> SignalContent | None:+ title = "Scroll-depth tracking disabled"+ summary = issue.payload.get("reason", "$pageleave events have no scroll-depth metadata.")+ return SignalContent(+ description=(+ f"This project's `$pageleave` events carry no scroll-depth metadata over the last "+ f"{SCROLL_DEPTH_LOOKBACK_DAYS} days, so scroll-depth reports in web analytics will be empty. "+ "This usually means scroll-depth autocapture is disabled in the SDK config. Recommend enabling "+ "it so engagement-by-scroll-depth is captured."+ ),+ weight=_SEVERITY_WEIGHT[issue.severity],+ extra=build_signal_extra(issue, title=title, summary=summary, link="/web/health"),+ )+def detect(self, team_ids: list[int]) -> dict[int, list[HealthCheckResult]]:rows = execute_clickhouse_health_team_query(SCROLL_DEPTH_SQL,diff --git a/products/web_analytics/backend/temporal/health_checks/web_vitals.py b/products/web_analytics/backend/temporal/health_checks/web_vitals.pyindex 18f0a425b18e..ecd2b4675d7c 100644--- a/products/web_analytics/backend/temporal/health_checks/web_vitals.py+++ b/products/web_analytics/backend/temporal/health_checks/web_vitals.py@@ -1,7 +1,14 @@from posthog.dags.common.owners import JobOwnersfrom posthog.models.health_issue import HealthIssuefrom posthog.temporal.health_checks.detectors import CLICKHOUSE_BATCH_EXECUTION_POLICY-from posthog.temporal.health_checks.framework import AlertContent, HealthCheck, Remediation+from posthog.temporal.health_checks.framework import (+ _SEVERITY_WEIGHT,+ AlertContent,+ HealthCheck,+ Remediation,+ SignalContent,+ build_signal_extra,+)from posthog.temporal.health_checks.models import HealthCheckResultfrom posthog.temporal.health_checks.query import execute_clickhouse_health_team_query@@ -49,6 +56,21 @@ class WebVitalsCheck(HealthCheck):link="/web/health",)+ @classmethod+ def render_signal(cls, issue: HealthIssue) -> SignalContent | None:+ title = "No web vitals events"+ summary = issue.payload.get("reason", "$web_vitals events are not being received.")+ return SignalContent(+ description=(+ f"This project is sending `$pageview` events but no `$web_vitals` events over the last "+ f"{WEB_VITALS_LOOKBACK_DAYS} days, so Core Web Vitals (LCP, CLS, INP, FCP) won't appear in web "+ "analytics. This usually means web-vitals autocapture is disabled in the SDK config. Recommend "+ "enabling it to track page performance."+ ),+ weight=_SEVERITY_WEIGHT[issue.severity],+ extra=build_signal_extra(issue, title=title, summary=summary, link="/web/health"),+ )+def detect(self, team_ids: list[int]) -> dict[int, list[HealthCheckResult]]:rows = execute_clickhouse_health_team_query(WEB_VITALS_SQL,diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex da536db2f8af..450a2d0f5e13 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -30097,6 +30097,7 @@ export namespace Schemas {* * `pganalyze` - pganalyze* * `signals_scout` - Signals scout* * `logs` - Logs+ * * `health_checks` - Health checks*/export type SourceProductEnum = typeof SourceProductEnum[keyof typeof SourceProductEnum];@@ -30112,6 +30113,7 @@ export namespace Schemas {Pganalyze: 'pganalyze',SignalsScout: 'signals_scout',Logs: 'logs',+ HealthChecks: 'health_checks',} as const;/**@@ -30124,6 +30126,7 @@ export namespace Schemas {* * `issue_spiking` - Issue spiking* * `cross_source_issue` - Cross source issue* * `alert_state_change` - Alert state change+ * * `health_issue` - Health issue*/export type SignalSourceConfigSourceTypeEnum = typeof SignalSourceConfigSourceTypeEnum[keyof typeof SignalSourceConfigSourceTypeEnum];@@ -30138,6 +30141,7 @@ export namespace Schemas {IssueSpiking: 'issue_spiking',CrossSourceIssue: 'cross_source_issue',AlertStateChange: 'alert_state_change',+ HealthIssue: 'health_issue',} as const;export interface SignalSourceConfig {diff --git a/services/mcp/src/generated/signals/api.ts b/services/mcp/src/generated/signals/api.tsindex 4ca17beb1996..49ed62b5d9c4 100644--- a/services/mcp/src/generated/signals/api.ts+++ b/services/mcp/src/generated/signals/api.ts@@ -566,9 +566,10 @@ export const SignalsSourceConfigsCreateBody = /* @__PURE__ */ zod.object({'pganalyze','signals_scout','logs',+ 'health_checks',]).describe(- '* `session_replay` - Session replay\n* `llm_analytics` - LLM analytics\n* `github` - GitHub\n* `linear` - Linear\n* `zendesk` - Zendesk\n* `conversations` - Conversations\n* `error_tracking` - Error tracking\n* `pganalyze` - pganalyze\n* `signals_scout` - Signals scout\n* `logs` - Logs'+ '* `session_replay` - Session replay\n* `llm_analytics` - LLM analytics\n* `github` - GitHub\n* `linear` - Linear\n* `zendesk` - Zendesk\n* `conversations` - Conversations\n* `error_tracking` - Error tracking\n* `pganalyze` - pganalyze\n* `signals_scout` - Signals scout\n* `logs` - Logs\n* `health_checks` - Health checks'),source_type: zod.enum([@@ -581,9 +582,10 @@ export const SignalsSourceConfigsCreateBody = /* @__PURE__ */ zod.object({'issue_spiking','cross_source_issue','alert_state_change',+ 'health_issue',]).describe(- '* `session_analysis_cluster` - Session analysis cluster\n* `evaluation` - Evaluation\n* `issue` - Issue\n* `ticket` - Ticket\n* `issue_created` - Issue created\n* `issue_reopened` - Issue reopened\n* `issue_spiking` - Issue spiking\n* `cross_source_issue` - Cross source issue\n* `alert_state_change` - Alert state change'+ '* `session_analysis_cluster` - Session analysis cluster\n* `evaluation` - Evaluation\n* `issue` - Issue\n* `ticket` - Ticket\n* `issue_created` - Issue created\n* `issue_reopened` - Issue reopened\n* `issue_spiking` - Issue spiking\n* `cross_source_issue` - Cross source issue\n* `alert_state_change` - Alert state change\n* `health_issue` - Health issue'),enabled: zod.boolean().optional(),config: zod.unknown().optional(),@@ -620,9 +622,10 @@ export const SignalsSourceConfigsUpdateBody = /* @__PURE__ */ zod.object({'pganalyze','signals_scout','logs',+ 'health_checks',]).describe(- '* `session_replay` - Session replay\n* `llm_analytics` - LLM analytics\n* `github` - GitHub\n* `linear` - Linear\n* `zendesk` - Zendesk\n* `conversations` - Conversations\n* `error_tracking` - Error tracking\n* `pganalyze` - pganalyze\n* `signals_scout` - Signals scout\n* `logs` - Logs'+ '* `session_replay` - Session replay\n* `llm_analytics` - LLM analytics\n* `github` - GitHub\n* `linear` - Linear\n* `zendesk` - Zendesk\n* `conversations` - Conversations\n* `error_tracking` - Error tracking\n* `pganalyze` - pganalyze\n* `signals_scout` - Signals scout\n* `logs` - Logs\n* `health_checks` - Health checks'),source_type: zod.enum([@@ -635,9 +638,10 @@ export const SignalsSourceConfigsUpdateBody = /* @__PURE__ */ zod.object({'issue_spiking','cross_source_issue','alert_state_change',+ 'health_issue',]).describe(- '* `session_analysis_cluster` - Session analysis cluster\n* `evaluation` - Evaluation\n* `issue` - Issue\n* `ticket` - Ticket\n* `issue_created` - Issue created\n* `issue_reopened` - Issue reopened\n* `issue_spiking` - Issue spiking\n* `cross_source_issue` - Cross source issue\n* `alert_state_change` - Alert state change'+ '* `session_analysis_cluster` - Session analysis cluster\n* `evaluation` - Evaluation\n* `issue` - Issue\n* `ticket` - Ticket\n* `issue_created` - Issue created\n* `issue_reopened` - Issue reopened\n* `issue_spiking` - Issue spiking\n* `cross_source_issue` - Cross source issue\n* `alert_state_change` - Alert state change\n* `health_issue` - Health issue'),enabled: zod.boolean().optional(),config: zod.unknown().optional(),@@ -665,10 +669,11 @@ export const SignalsSourceConfigsPartialUpdateBody = /* @__PURE__ */ zod.object('pganalyze','signals_scout','logs',+ 'health_checks',]).optional().describe(- '* `session_replay` - Session replay\n* `llm_analytics` - LLM analytics\n* `github` - GitHub\n* `linear` - Linear\n* `zendesk` - Zendesk\n* `conversations` - Conversations\n* `error_tracking` - Error tracking\n* `pganalyze` - pganalyze\n* `signals_scout` - Signals scout\n* `logs` - Logs'+ '* `session_replay` - Session replay\n* `llm_analytics` - LLM analytics\n* `github` - GitHub\n* `linear` - Linear\n* `zendesk` - Zendesk\n* `conversations` - Conversations\n* `error_tracking` - Error tracking\n* `pganalyze` - pganalyze\n* `signals_scout` - Signals scout\n* `logs` - Logs\n* `health_checks` - Health checks'),source_type: zod.enum([@@ -681,10 +686,11 @@ export const SignalsSourceConfigsPartialUpdateBody = /* @__PURE__ */ zod.object('issue_spiking','cross_source_issue','alert_state_change',+ 'health_issue',]).optional().describe(- '* `session_analysis_cluster` - Session analysis cluster\n* `evaluation` - Evaluation\n* `issue` - Issue\n* `ticket` - Ticket\n* `issue_created` - Issue created\n* `issue_reopened` - Issue reopened\n* `issue_spiking` - Issue spiking\n* `cross_source_issue` - Cross source issue\n* `alert_state_change` - Alert state change'+ '* `session_analysis_cluster` - Session analysis cluster\n* `evaluation` - Evaluation\n* `issue` - Issue\n* `ticket` - Ticket\n* `issue_created` - Issue created\n* `issue_reopened` - Issue reopened\n* `issue_spiking` - Issue spiking\n* `cross_source_issue` - Cross source issue\n* `alert_state_change` - Alert state change\n* `health_issue` - Health issue'),enabled: zod.boolean().optional(),config: zod.unknown().optional(),diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-source-configs-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-source-configs-create.jsonindex 34c60b26f6e9..a8681f46d94f 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-source-configs-create.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-source-configs-create.json@@ -6,7 +6,7 @@"type": "boolean"},"source_product": {- "description": "* `session_replay` - Session replay\n* `llm_analytics` - LLM analytics\n* `github` - GitHub\n* `linear` - Linear\n* `zendesk` - Zendesk\n* `conversations` - Conversations\n* `error_tracking` - Error tracking\n* `pganalyze` - pganalyze\n* `signals_scout` - Signals scout\n* `logs` - Logs",+ "description": "* `session_replay` - Session replay\n* `llm_analytics` - LLM analytics\n* `github` - GitHub\n* `linear` - Linear\n* `zendesk` - Zendesk\n* `conversations` - Conversations\n* `error_tracking` - Error tracking\n* `pganalyze` - pganalyze\n* `signals_scout` - Signals scout\n* `logs` - Logs\n* `health_checks` - Health checks","enum": ["session_replay","llm_analytics",@@ -17,12 +17,13 @@"error_tracking","pganalyze","signals_scout",- "logs"+ "logs",+ "health_checks"],"type": "string"},"source_type": {- "description": "* `session_analysis_cluster` - Session analysis cluster\n* `evaluation` - Evaluation\n* `issue` - Issue\n* `ticket` - Ticket\n* `issue_created` - Issue created\n* `issue_reopened` - Issue reopened\n* `issue_spiking` - Issue spiking\n* `cross_source_issue` - Cross source issue\n* `alert_state_change` - Alert state change",+ "description": "* `session_analysis_cluster` - Session analysis cluster\n* `evaluation` - Evaluation\n* `issue` - Issue\n* `ticket` - Ticket\n* `issue_created` - Issue created\n* `issue_reopened` - Issue reopened\n* `issue_spiking` - Issue spiking\n* `cross_source_issue` - Cross source issue\n* `alert_state_change` - Alert state change\n* `health_issue` - Health issue","enum": ["session_analysis_cluster","evaluation",@@ -32,7 +33,8 @@"issue_reopened","issue_spiking","cross_source_issue",- "alert_state_change"+ "alert_state_change",+ "health_issue"],"type": "string"}diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-source-configs-partial-update.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-source-configs-partial-update.jsonindex efcea9f369f6..2a1bcaee3cc3 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-source-configs-partial-update.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-source-configs-partial-update.json@@ -10,7 +10,7 @@"type": "string"},"source_product": {- "description": "* `session_replay` - Session replay\n* `llm_analytics` - LLM analytics\n* `github` - GitHub\n* `linear` - Linear\n* `zendesk` - Zendesk\n* `conversations` - Conversations\n* `error_tracking` - Error tracking\n* `pganalyze` - pganalyze\n* `signals_scout` - Signals scout\n* `logs` - Logs",+ "description": "* `session_replay` - Session replay\n* `llm_analytics` - LLM analytics\n* `github` - GitHub\n* `linear` - Linear\n* `zendesk` - Zendesk\n* `conversations` - Conversations\n* `error_tracking` - Error tracking\n* `pganalyze` - pganalyze\n* `signals_scout` - Signals scout\n* `logs` - Logs\n* `health_checks` - Health checks","enum": ["session_replay","llm_analytics",@@ -21,12 +21,13 @@"error_tracking","pganalyze","signals_scout",- "logs"+ "logs",+ "health_checks"],"type": "string"},"source_type": {- "description": "* `session_analysis_cluster` - Session analysis cluster\n* `evaluation` - Evaluation\n* `issue` - Issue\n* `ticket` - Ticket\n* `issue_created` - Issue created\n* `issue_reopened` - Issue reopened\n* `issue_spiking` - Issue spiking\n* `cross_source_issue` - Cross source issue\n* `alert_state_change` - Alert state change",+ "description": "* `session_analysis_cluster` - Session analysis cluster\n* `evaluation` - Evaluation\n* `issue` - Issue\n* `ticket` - Ticket\n* `issue_created` - Issue created\n* `issue_reopened` - Issue reopened\n* `issue_spiking` - Issue spiking\n* `cross_source_issue` - Cross source issue\n* `alert_state_change` - Alert state change\n* `health_issue` - Health issue","enum": ["session_analysis_cluster","evaluation",@@ -36,7 +37,8 @@"issue_reopened","issue_spiking","cross_source_issue",- "alert_state_change"+ "alert_state_change",+ "health_issue"],"type": "string"}diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-source-configs-update.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-source-configs-update.jsonindex 94dd7e5331d3..d68585a7399f 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-source-configs-update.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-source-configs-update.json@@ -10,7 +10,7 @@"type": "string"},"source_product": {- "description": "* `session_replay` - Session replay\n* `llm_analytics` - LLM analytics\n* `github` - GitHub\n* `linear` - Linear\n* `zendesk` - Zendesk\n* `conversations` - Conversations\n* `error_tracking` - Error tracking\n* `pganalyze` - pganalyze\n* `signals_scout` - Signals scout\n* `logs` - Logs",+ "description": "* `session_replay` - Session replay\n* `llm_analytics` - LLM analytics\n* `github` - GitHub\n* `linear` - Linear\n* `zendesk` - Zendesk\n* `conversations` - Conversations\n* `error_tracking` - Error tracking\n* `pganalyze` - pganalyze\n* `signals_scout` - Signals scout\n* `logs` - Logs\n* `health_checks` - Health checks","enum": ["session_replay","llm_analytics",@@ -21,12 +21,13 @@"error_tracking","pganalyze","signals_scout",- "logs"+ "logs",+ "health_checks"],"type": "string"},"source_type": {- "description": "* `session_analysis_cluster` - Session analysis cluster\n* `evaluation` - Evaluation\n* `issue` - Issue\n* `ticket` - Ticket\n* `issue_created` - Issue created\n* `issue_reopened` - Issue reopened\n* `issue_spiking` - Issue spiking\n* `cross_source_issue` - Cross source issue\n* `alert_state_change` - Alert state change",+ "description": "* `session_analysis_cluster` - Session analysis cluster\n* `evaluation` - Evaluation\n* `issue` - Issue\n* `ticket` - Ticket\n* `issue_created` - Issue created\n* `issue_reopened` - Issue reopened\n* `issue_spiking` - Issue spiking\n* `cross_source_issue` - Cross source issue\n* `alert_state_change` - Alert state change\n* `health_issue` - Health issue","enum": ["session_analysis_cluster","evaluation",@@ -36,7 +37,8 @@"issue_reopened","issue_spiking","cross_source_issue",- "alert_state_change"+ "alert_state_change",+ "health_issue"],"type": "string"}