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(dags): route revenue analytics slack alerts to web analytics (#60449)

Rafael Audibert903fe8b980cc
diff --git a/posthog/dags/common/owners.py b/posthog/dags/common/owners.py
index 55317e56cbff..4626efb095f7 100644
--- a/posthog/dags/common/owners.py
+++ b/posthog/dags/common/owners.py
@@ -17,6 +17,5 @@ class JobOwners(str, Enum):
TEAM_MANAGED_WAREHOUSE = "team-managed-warehouse"
TEAM_POSTHOG_AI = "team-posthog-ai"
TEAM_QUERY_PERFORMANCE = "team-query-performance"
- TEAM_REVENUE_ANALYTICS = "team-revenue-analytics"
TEAM_WAREHOUSE_SOURCES = "team-warehouse-sources"
TEAM_WEB_ANALYTICS = "team-web-analytics"
diff --git a/posthog/dags/slack_alerts.py b/posthog/dags/slack_alerts.py
index 709a3acb191b..92f7c54e5cfb 100644
--- a/posthog/dags/slack_alerts.py
+++ b/posthog/dags/slack_alerts.py
@@ -23,7 +23,6 @@ notification_channel_per_team = {
JobOwners.TEAM_LOGS.value: "#alerts-logs-prod",
JobOwners.TEAM_POSTHOG_AI.value: "#alerts-max-ai",
JobOwners.TEAM_QUERY_PERFORMANCE.value: "#alerts-query-performance",
- JobOwners.TEAM_REVENUE_ANALYTICS.value: "#alerts-growth",
JobOwners.TEAM_WAREHOUSE_SOURCES.value: "#alerts-warehouse-sources",
JobOwners.TEAM_WEB_ANALYTICS.value: "#alerts-web-analytics",
}
diff --git a/posthog/dags/tests/test_slack_alerts.py b/posthog/dags/tests/test_slack_alerts.py
index 8ce165a8b515..10fb670b36e9 100644
--- a/posthog/dags/tests/test_slack_alerts.py
+++ b/posthog/dags/tests/test_slack_alerts.py
@@ -33,7 +33,7 @@ class TestSlackAlertsRouting:
def test_asset_job_with_mixed_steps_routes_to_web_analytics(self):
mock_run = mock.MagicMock(spec=dagster.DagsterRun)
mock_run.job_name = "__ASSET_JOB"
- mock_run.tags = {"owner": JobOwners.TEAM_REVENUE_ANALYTICS.value}
+ mock_run.tags = {"owner": JobOwners.TEAM_DATA_MODELING.value}
error_message = "Execution of run for \"__ASSET_JOB\" failed. Steps failed: ['some_other_asset', 'web_pre_aggregated_bounces', 'clickhouse_asset']."
@@ -44,13 +44,13 @@ class TestSlackAlertsRouting:
def test_asset_job_without_web_steps_uses_original_owner(self):
mock_run = mock.MagicMock(spec=dagster.DagsterRun)
mock_run.job_name = "__ASSET_JOB"
- mock_run.tags = {"owner": JobOwners.TEAM_REVENUE_ANALYTICS.value}
+ mock_run.tags = {"owner": JobOwners.TEAM_DATA_MODELING.value}
- error_message = "Execution of run for \"__ASSET_JOB\" failed. Steps failed: ['revenue_analytics_daily', 'exchange_rates_hourly']."
+ error_message = "Execution of run for \"__ASSET_JOB\" failed. Steps failed: ['exchange_rates_daily', 'exchange_rates_hourly']."
result = get_job_owner_for_alert(mock_run, error_message)
- assert result == JobOwners.TEAM_REVENUE_ANALYTICS.value
+ assert result == JobOwners.TEAM_DATA_MODELING.value
def test_asset_job_no_failed_steps_uses_original_owner(self):
mock_run = mock.MagicMock(spec=dagster.DagsterRun)
diff --git a/products/revenue_analytics/dags/exchange_rate.py b/products/revenue_analytics/dags/exchange_rate.py
index 1697969ae5cc..a1976087a3ca 100644
--- a/products/revenue_analytics/dags/exchange_rate.py
+++ b/products/revenue_analytics/dags/exchange_rate.py
@@ -301,13 +301,13 @@ def hourly_exchange_rates_in_clickhouse(
daily_exchange_rates_job = dagster.define_asset_job(
name="daily_exchange_rates_job",
selection=[daily_exchange_rates.key, daily_exchange_rates_in_clickhouse.key],
- tags={"owner": JobOwners.TEAM_REVENUE_ANALYTICS.value},
+ tags={"owner": JobOwners.TEAM_WEB_ANALYTICS.value},
)
hourly_exchange_rates_job = dagster.define_asset_job(
name="hourly_exchange_rates_job",
selection=[hourly_exchange_rates.key, hourly_exchange_rates_in_clickhouse.key],
- tags={"owner": JobOwners.TEAM_REVENUE_ANALYTICS.value},
+ tags={"owner": JobOwners.TEAM_WEB_ANALYTICS.value},
)