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(logs): move viewsets to presentation/views (#64504)

Jon McCallum0f81550552e3
diff --git a/products/logs/backend/presentation/__init__.py b/products/logs/backend/presentation/__init__.py
new file mode 100644
index 000000000000..e0dd40db3b58
--- /dev/null
+++ b/products/logs/backend/presentation/__init__.py
@@ -0,0 +1 @@
+"""HTTP presentation layer of the logs product (DRF viewsets and serializers)."""
diff --git a/products/logs/backend/presentation/views/__init__.py b/products/logs/backend/presentation/views/__init__.py
new file mode 100644
index 000000000000..dfd3ac8b1a39
--- /dev/null
+++ b/products/logs/backend/presentation/views/__init__.py
@@ -0,0 +1,3 @@
+"""DRF viewsets for logs — submodule paths (`backend.presentation.views.*`) are part
+of the shared tach interface for isolated products.
+"""
diff --git a/products/logs/backend/alerts_api.py b/products/logs/backend/presentation/views/alerts_api.py
similarity index 100%
rename from products/logs/backend/alerts_api.py
rename to products/logs/backend/presentation/views/alerts_api.py
diff --git a/products/logs/backend/api.py b/products/logs/backend/presentation/views/api.py
similarity index 99%
rename from products/logs/backend/api.py
rename to products/logs/backend/presentation/views/api.py
index d1439b9d3dce..e7da0faa767f 100644
--- a/products/logs/backend/api.py
+++ b/products/logs/backend/presentation/views/api.py
@@ -37,22 +37,22 @@ from posthog.models import User
from posthog.tasks.exporter import export_asset
from products.exports.backend.models.exported_asset import ExportedAsset
-from products.logs.backend.alerts_api import LogsAlertViewSet
from products.logs.backend.count_query_runner import CountQueryRunner
from products.logs.backend.count_ranges_query_runner import (
DEFAULT_TARGET_BUCKETS,
MAX_TARGET_BUCKETS,
CountRangesQueryRunner,
)
-from products.logs.backend.explain import LogExplainViewSet
from products.logs.backend.has_logs_query_runner import team_has_logs
from products.logs.backend.log_attributes_query_runner import LogAttributesQueryRunner
from products.logs.backend.log_values_query_runner import LogValuesQueryRunner
from products.logs.backend.logs_query_runner import CachedLogsQueryResponse, LogsQueryResponse, LogsQueryRunner
-from products.logs.backend.sampling_api import LogsSamplingRuleViewSet
+from products.logs.backend.presentation.views.alerts_api import LogsAlertViewSet
+from products.logs.backend.presentation.views.explain import LogExplainViewSet
+from products.logs.backend.presentation.views.sampling_api import LogsSamplingRuleViewSet
+from products.logs.backend.presentation.views.views_api import LogsViewViewSet
from products.logs.backend.services_query_runner import ServicesQueryRunner
from products.logs.backend.sparkline_query_runner import SparklineQueryRunner
-from products.logs.backend.views_api import LogsViewViewSet
__all__ = ["LogsViewSet", "LogExplainViewSet", "LogsAlertViewSet", "LogsSamplingRuleViewSet", "LogsViewViewSet"]
diff --git a/products/logs/backend/explain.py b/products/logs/backend/presentation/views/explain.py
similarity index 100%
rename from products/logs/backend/explain.py
rename to products/logs/backend/presentation/views/explain.py
diff --git a/products/logs/backend/sampling_api.py b/products/logs/backend/presentation/views/sampling_api.py
similarity index 100%
rename from products/logs/backend/sampling_api.py
rename to products/logs/backend/presentation/views/sampling_api.py
diff --git a/products/logs/backend/views_api.py b/products/logs/backend/presentation/views/views_api.py
similarity index 100%
rename from products/logs/backend/views_api.py
rename to products/logs/backend/presentation/views/views_api.py
diff --git a/products/logs/backend/routes.py b/products/logs/backend/routes.py
index b40ce8e5d4fe..7d62698e9ef0 100644
--- a/products/logs/backend/routes.py
+++ b/products/logs/backend/routes.py
@@ -1,6 +1,6 @@
from posthog.api.routing import RouterRegistry
-import products.logs.backend.api as logs
+import products.logs.backend.presentation.views.api as logs
def register_routes(routers: RouterRegistry) -> None:
diff --git a/products/logs/backend/test/test_alerts_api.py b/products/logs/backend/test/test_alerts_api.py
index 1df43452190b..836cfc579be9 100644
--- a/products/logs/backend/test/test_alerts_api.py
+++ b/products/logs/backend/test/test_alerts_api.py
@@ -16,8 +16,8 @@ from posthog.models.team.team import Team
from products.logs.backend.alert_check_query import AlertCheckQuery, BucketedCount
from products.logs.backend.alert_utils import compute_shard_offset_seconds
-from products.logs.backend.alerts_api import ALLOWED_WINDOW_MINUTES, MAX_ALERTS_PER_TEAM
from products.logs.backend.models import LogsAlertConfiguration, LogsAlertEvent
+from products.logs.backend.presentation.views.alerts_api import ALLOWED_WINDOW_MINUTES, MAX_ALERTS_PER_TEAM
def _make_log_row(*, team_id: int, service: str, uuid: str, ts: datetime, body: str) -> dict:
@@ -60,7 +60,7 @@ class TestLogsAlertAPI(APIBaseTest):
# --- CRUD ---
- @patch("products.logs.backend.alerts_api.report_user_action")
+ @patch("products.logs.backend.presentation.views.alerts_api.report_user_action")
def test_create(self, mock_report):
data = self._create_via_api()
assert data["name"] == "High error rate"
@@ -172,7 +172,7 @@ class TestLogsAlertAPI(APIBaseTest):
assert response.status_code == status.HTTP_200_OK
assert response.json()["name"] == "Renamed"
- @patch("products.logs.backend.alerts_api.report_user_action")
+ @patch("products.logs.backend.presentation.views.alerts_api.report_user_action")
def test_partial_update(self, mock_report):
created = self._create_via_api()
mock_report.reset_mock()
@@ -189,7 +189,7 @@ class TestLogsAlertAPI(APIBaseTest):
assert mock_report.call_args[0][1] == "logs alert updated"
assert mock_report.call_args[0][2]["name"] == "Patched"
- @patch("products.logs.backend.alerts_api.report_user_action")
+ @patch("products.logs.backend.presentation.views.alerts_api.report_user_action")
def test_delete(self, mock_report):
created = self._create_via_api()
mock_report.reset_mock()
@@ -487,7 +487,7 @@ class TestLogsAlertAPI(APIBaseTest):
)
patched_ids = frozenset({self.team.id}) if uncapped else frozenset()
- with patch("products.logs.backend.alerts_api.UNCAPPED_ALERT_TEAM_IDS", patched_ids):
+ with patch("products.logs.backend.presentation.views.alerts_api.UNCAPPED_ALERT_TEAM_IDS", patched_ids):
response = self.client.post(
self.base_url,
self._valid_payload(name="Boundary"),
@@ -747,7 +747,7 @@ class TestLogsAlertAPI(APIBaseTest):
},
)
- @patch("products.logs.backend.alerts_api.report_user_action")
+ @patch("products.logs.backend.presentation.views.alerts_api.report_user_action")
def test_create_slack_destination_creates_one_hog_function_per_event_kind(self, mock_report):
self._sync_destination_templates()
from products.cdp.backend.models.hog_functions.hog_function import HogFunction
@@ -921,7 +921,7 @@ class TestLogsAlertAPI(APIBaseTest):
def _reset_url(self, alert_id: str) -> str:
return f"{self.base_url}{alert_id}/reset/"
- @patch("products.logs.backend.alerts_api.report_user_action")
+ @patch("products.logs.backend.presentation.views.alerts_api.report_user_action")
def test_reset_broken_alert(self, mock_report):
created = self._create_via_api()
LogsAlertConfiguration.objects.filter(pk=created["id"]).update(
@@ -1400,7 +1400,7 @@ class TestLogsAlertAPI(APIBaseTest):
return [BucketedCount(timestamp=base + timedelta(minutes=m), count=c) for m, c in offset_counts]
@freeze_time("2025-12-16T10:30:00Z")
- @patch("products.logs.backend.alerts_api.AlertCheckQuery")
+ @patch("products.logs.backend.presentation.views.alerts_api.AlertCheckQuery")
def test_simulate_returns_response_shape(self, mock_query_cls):
mock_query_cls.return_value.execute_bucketed.return_value = self._mock_cadence_buckets([(0, 50), (5, 20)])
@@ -1418,7 +1418,7 @@ class TestLogsAlertAPI(APIBaseTest):
assert "notification" in bucket
@freeze_time("2025-12-16T10:30:00Z")
- @patch("products.logs.backend.alerts_api.AlertCheckQuery")
+ @patch("products.logs.backend.presentation.views.alerts_api.AlertCheckQuery")
def test_simulate_fills_empty_minutes(self, mock_query_cls):
# Two data points 10 minutes apart — should fill 5-min cadence gaps between them
mock_query_cls.return_value.execute_bucketed.return_value = self._mock_cadence_buckets([(0, 50), (10, 200)])
@@ -1451,7 +1451,7 @@ class TestLogsAlertAPI(APIBaseTest):
]
)
@freeze_time("2025-12-16T10:30:00Z")
- @patch("products.logs.backend.alerts_api.AlertCheckQuery")
+ @patch("products.logs.backend.presentation.views.alerts_api.AlertCheckQuery")
def test_simulate_rolling_window(self, _name, buckets, payload_overrides, expected, mock_query_cls):
mock_query_cls.return_value.execute_bucketed.return_value = self._mock_cadence_buckets(buckets)
@@ -1467,7 +1467,7 @@ class TestLogsAlertAPI(APIBaseTest):
assert data["resolve_count"] >= expected["min_resolve_count"]
@freeze_time("2025-12-16T10:30:00Z")
- @patch("products.logs.backend.alerts_api.AlertCheckQuery")
+ @patch("products.logs.backend.presentation.views.alerts_api.AlertCheckQuery")
def test_simulate_n_of_m_delays_firing(self, mock_query_cls):
# window=5, 2-of-3 N-of-M. Cadence-spaced buckets at minute 0 and 5 each have
# 150 logs (above threshold=100). At cadence 0 only 1-of-3 has breached, so
@@ -1495,7 +1495,7 @@ class TestLogsAlertAPI(APIBaseTest):
assert data_buckets[1]["notification"] == "fire"
@freeze_time("2025-12-16T10:30:00Z")
- @patch("products.logs.backend.alerts_api.AlertCheckQuery")
+ @patch("products.logs.backend.presentation.views.alerts_api.AlertCheckQuery")
def test_simulate_cooldown_suppresses_renotification(self, mock_query_cls):
# window=5, cooldown=15 min. Two spikes 10 minutes apart: first fires at minute 0,
# rolling sum drops below threshold at minute 5 (spike falls out of window) -> resolves,
@@ -1522,7 +1522,7 @@ class TestLogsAlertAPI(APIBaseTest):
assert data["fire_count"] == 1
@freeze_time("2025-12-16T10:30:00Z")
- @patch("products.logs.backend.alerts_api.AlertCheckQuery")
+ @patch("products.logs.backend.presentation.views.alerts_api.AlertCheckQuery")
def test_simulate_empty_results(self, mock_query_cls):
mock_query_cls.return_value.execute_bucketed.return_value = []
@@ -1558,7 +1558,7 @@ class TestLogsAlertAPI(APIBaseTest):
assert response.status_code == status.HTTP_400_BAD_REQUEST
@freeze_time("2025-12-16T10:30:00Z")
- @patch("products.logs.backend.alerts_api.AlertCheckQuery")
+ @patch("products.logs.backend.presentation.views.alerts_api.AlertCheckQuery")
def test_simulate_echoes_threshold_config(self, mock_query_cls):
mock_query_cls.return_value.execute_bucketed.return_value = self._mock_cadence_buckets([(0, 10)])
@@ -1572,7 +1572,7 @@ class TestLogsAlertAPI(APIBaseTest):
assert data["threshold_operator"] == "below"
@freeze_time("2025-12-16T10:30:00Z")
- @patch("products.logs.backend.alerts_api.AlertCheckQuery")
+ @patch("products.logs.backend.presentation.views.alerts_api.AlertCheckQuery")
def test_simulate_rolling_window_excludes_current_bucket(self, mock_query_cls):
# Regression test: the simulator's rolling sum at bucket time T must
# match the actual evaluator's `[T-window, T)` semantics — purely past,
diff --git a/products/logs/backend/test/test_explain.py b/products/logs/backend/test/test_explain.py
index 39dd8e317634..9e1e48114516 100644
--- a/products/logs/backend/test/test_explain.py
+++ b/products/logs/backend/test/test_explain.py
@@ -11,7 +11,7 @@ from rest_framework import exceptions, status
from posthog.clickhouse.client import sync_execute
-from products.logs.backend.explain import (
+from products.logs.backend.presentation.views.explain import (
LogExplanationResponse,
explain_log_with_openai,
fetch_log_by_uuid,
@@ -88,7 +88,7 @@ class TestExplainLogWithOpenAI:
mock_response.choices = [MagicMock()]
mock_response.choices[0].message.content = valid_explanation_json
- with patch("products.logs.backend.explain.AsyncOpenAI") as mock_client_class:
+ with patch("products.logs.backend.presentation.views.explain.AsyncOpenAI") as mock_client_class:
mock_client = AsyncMock()
mock_client_class.return_value = mock_client
mock_client.chat.completions.create = AsyncMock(return_value=mock_response)
@@ -107,7 +107,7 @@ class TestExplainLogWithOpenAI:
mock_response.choices = [MagicMock()]
mock_response.choices[0].message.content = None
- with patch("products.logs.backend.explain.AsyncOpenAI") as mock_client_class:
+ with patch("products.logs.backend.presentation.views.explain.AsyncOpenAI") as mock_client_class:
mock_client = AsyncMock()
mock_client_class.return_value = mock_client
mock_client.chat.completions.create = AsyncMock(return_value=mock_response)
@@ -117,7 +117,7 @@ class TestExplainLogWithOpenAI:
@pytest.mark.asyncio
async def test_api_error_raises_api_exception(self, sample_log_data):
- with patch("products.logs.backend.explain.AsyncOpenAI") as mock_client_class:
+ with patch("products.logs.backend.presentation.views.explain.AsyncOpenAI") as mock_client_class:
mock_client = AsyncMock()
mock_client_class.return_value = mock_client
mock_client.chat.completions.create = AsyncMock(side_effect=Exception("API Error"))
@@ -131,7 +131,7 @@ class TestExplainLogWithOpenAI:
mock_response.choices = [MagicMock()]
mock_response.choices[0].message.content = valid_explanation_json
- with patch("products.logs.backend.explain.AsyncOpenAI") as mock_client_class:
+ with patch("products.logs.backend.presentation.views.explain.AsyncOpenAI") as mock_client_class:
mock_client = AsyncMock()
mock_client_class.return_value = mock_client
mock_client.chat.completions.create = AsyncMock(return_value=mock_response)
@@ -148,7 +148,7 @@ class TestExplainLogWithOpenAI:
mock_response.choices = [MagicMock()]
mock_response.choices[0].message.content = valid_explanation_json
- with patch("products.logs.backend.explain.AsyncOpenAI") as mock_client_class:
+ with patch("products.logs.backend.presentation.views.explain.AsyncOpenAI") as mock_client_class:
mock_client = AsyncMock()
mock_client_class.return_value = mock_client
mock_client.chat.completions.create = AsyncMock(return_value=mock_response)
@@ -259,7 +259,7 @@ class TestLogExplainAPI(ClickhouseTestMixin, APIBaseTest):
)
assert response.status_code == status.HTTP_400_BAD_REQUEST
- @patch("products.logs.backend.explain.report_user_action")
+ @patch("products.logs.backend.presentation.views.explain.report_user_action")
def test_successful_explanation(self, mock_report):
self.organization.is_ai_data_processing_approved = True
self.organization.save()
@@ -278,7 +278,7 @@ class TestLogExplainAPI(ClickhouseTestMixin, APIBaseTest):
mock_response.choices = [MagicMock()]
mock_response.choices[0].message.content = self._get_valid_explanation_response()
- with patch("products.logs.backend.explain.AsyncOpenAI") as mock_client_class:
+ with patch("products.logs.backend.presentation.views.explain.AsyncOpenAI") as mock_client_class:
mock_client = AsyncMock()
mock_client_class.return_value = mock_client
mock_client.chat.completions.create = AsyncMock(return_value=mock_response)
@@ -299,7 +299,7 @@ class TestLogExplainAPI(ClickhouseTestMixin, APIBaseTest):
assert mock_report.call_args[0][1] == "logs explain requested"
assert mock_report.call_args[0][2]["cached"] is False
- @patch("products.logs.backend.explain.report_user_action")
+ @patch("products.logs.backend.presentation.views.explain.report_user_action")
def test_caches_result(self, mock_report):
self.organization.is_ai_data_processing_approved = True
self.organization.save()
@@ -318,7 +318,7 @@ class TestLogExplainAPI(ClickhouseTestMixin, APIBaseTest):
mock_response.choices = [MagicMock()]
mock_response.choices[0].message.content = self._get_valid_explanation_response()
- with patch("products.logs.backend.explain.AsyncOpenAI") as mock_client_class:
+ with patch("products.logs.backend.presentation.views.explain.AsyncOpenAI") as mock_client_class:
mock_client = AsyncMock()
mock_client_class.return_value = mock_client
mock_client.chat.completions.create = AsyncMock(return_value=mock_response)
@@ -363,7 +363,7 @@ class TestLogExplainAPI(ClickhouseTestMixin, APIBaseTest):
mock_response.choices = [MagicMock()]
mock_response.choices[0].message.content = self._get_valid_explanation_response()
- with patch("products.logs.backend.explain.AsyncOpenAI") as mock_client_class:
+ with patch("products.logs.backend.presentation.views.explain.AsyncOpenAI") as mock_client_class:
mock_client = AsyncMock()
mock_client_class.return_value = mock_client
mock_client.chat.completions.create = AsyncMock(return_value=mock_response)
diff --git a/products/logs/backend/test/test_has_logs_query_runner.py b/products/logs/backend/test/test_has_logs_query_runner.py
index 6e6437e7cfed..4b73904dd6f6 100644
--- a/products/logs/backend/test/test_has_logs_query_runner.py
+++ b/products/logs/backend/test/test_has_logs_query_runner.py
@@ -106,7 +106,7 @@ class TestHasLogsAPI(ClickhouseTestMixin, APIBaseTest):
# First call should hit the database and cache the result
with (
patch("products.logs.backend.has_logs_query_runner.HasLogsQueryRunner") as mock_runner,
- patch("products.logs.backend.api.report_user_action") as mock_report,
+ patch("products.logs.backend.presentation.views.api.report_user_action") as mock_report,
):
mock_runner.return_value.run.return_value = True
diff --git a/products/logs/backend/test/test_logs_export.py b/products/logs/backend/test/test_logs_export.py
index c21ffad8ef0a..e8af938b2f48 100644
--- a/products/logs/backend/test/test_logs_export.py
+++ b/products/logs/backend/test/test_logs_export.py
@@ -15,8 +15,8 @@ def _minimal_query_data() -> dict:
class TestLogsExportEndpoint(APIBaseTest):
- @patch("products.logs.backend.api.report_user_action")
- @patch("products.logs.backend.api.export_asset")
+ @patch("products.logs.backend.presentation.views.api.report_user_action")
+ @patch("products.logs.backend.presentation.views.api.export_asset")
def test_export_creates_asset_with_correct_context(self, mock_export_asset, mock_report):
response = self.client.post(
f"/api/projects/{self.team.pk}/logs/export/",
@@ -65,7 +65,7 @@ class TestLogsExportEndpoint(APIBaseTest):
),
]
)
- @patch("products.logs.backend.api.export_asset")
+ @patch("products.logs.backend.presentation.views.api.export_asset")
def test_export_filename_includes_service_and_date_range(
self, service_names, date_range, expected_filename, mock_export_asset
):
@@ -86,7 +86,7 @@ class TestLogsExportEndpoint(APIBaseTest):
assert asset.export_context is not None
assert asset.export_context["filename"] == expected_filename
- @patch("products.logs.backend.api.export_asset")
+ @patch("products.logs.backend.presentation.views.api.export_asset")
def test_export_creates_asset_successfully(self, mock_export_asset):
response = self.client.post(
f"/api/projects/{self.team.pk}/logs/export/",
diff --git a/products/logs/backend/test/test_logs_query_runner.py b/products/logs/backend/test/test_logs_query_runner.py
index b0178dcbca1d..ecf522d6153e 100644
--- a/products/logs/backend/test/test_logs_query_runner.py
+++ b/products/logs/backend/test/test_logs_query_runner.py
@@ -900,7 +900,7 @@ class TestLogsQueryRunner(ClickhouseTestMixin, APIBaseTest):
]
)
def test_normalize_filter_group(self, _name, input_value, expected):
- from products.logs.backend.api import LogsViewSet
+ from products.logs.backend.presentation.views.api import LogsViewSet
self.assertEqual(LogsViewSet._normalize_filter_group(input_value), expected)
diff --git a/products/logs/backend/test/test_sampling_rules_api.py b/products/logs/backend/test/test_sampling_rules_api.py
index d6fd85e005b6..f3352200c844 100644
--- a/products/logs/backend/test/test_sampling_rules_api.py
+++ b/products/logs/backend/test/test_sampling_rules_api.py
@@ -25,7 +25,7 @@ class TestLogsSamplingRulesAPI(APIBaseTest):
data.update(overrides)
return data
- @patch("products.logs.backend.sampling_api.report_user_action")
+ @patch("products.logs.backend.presentation.views.sampling_api.report_user_action")
def test_create_defaults_disabled_and_priority(self, mock_report):
response = self.client.post(self.base_url, self._payload(), format="json")
assert response.status_code == status.HTTP_201_CREATED, response.json()
diff --git a/products/logs/backend/test/test_views_api.py b/products/logs/backend/test/test_views_api.py
index 77ad0ee8b7e3..56d08830cae9 100644
--- a/products/logs/backend/test/test_views_api.py
+++ b/products/logs/backend/test/test_views_api.py
@@ -35,7 +35,7 @@ class TestLogsViewAPI(APIBaseTest):
# --- CRUD ---
- @patch("products.logs.backend.views_api.report_user_action")
+ @patch("products.logs.backend.presentation.views.views_api.report_user_action")
def test_create(self, mock_report):
data = self._create_via_api()
assert data["name"] == "Error logs"
@@ -67,7 +67,7 @@ class TestLogsViewAPI(APIBaseTest):
assert response.json()["short_id"] == created["short_id"]
assert response.json()["name"] == "Error logs"
- @patch("products.logs.backend.views_api.report_user_action")
+ @patch("products.logs.backend.presentation.views.views_api.report_user_action")
def test_partial_update(self, mock_report):
created = self._create_via_api()
mock_report.reset_mock()
@@ -96,7 +96,7 @@ class TestLogsViewAPI(APIBaseTest):
assert response.json()["name"] == "Just rename"
assert response.json()["filters"] == {"severityLevels": ["error"], "serviceNames": ["api"]}
- @patch("products.logs.backend.views_api.report_user_action")
+ @patch("products.logs.backend.presentation.views.views_api.report_user_action")
def test_delete(self, mock_report):
created = self._create_via_api()
mock_report.reset_mock()
diff --git a/pyproject.toml b/pyproject.toml
index 26b6e8498c04..b139ca96a0f9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -549,6 +549,29 @@ ignore_imports = [
"products.error_tracking.backend.presentation.views.suppression_rules -> products.error_tracking.backend.models",
"products.error_tracking.backend.presentation.views.symbol_sets -> products.error_tracking.backend.models",
"products.error_tracking.backend.presentation.views.utils -> products.error_tracking.backend.hogvm_stl",
+ # logs presentation isolation (temporary): the moved viewsets still reach in-product
+ # internals directly. Removed by the follow-up that thins each viewset to go through
+ # the facade.
+ "products.logs.backend.presentation.views.api -> products.logs.backend.count_query_runner",
+ "products.logs.backend.presentation.views.api -> products.logs.backend.count_ranges_query_runner",
+ "products.logs.backend.presentation.views.api -> products.logs.backend.has_logs_query_runner",
+ "products.logs.backend.presentation.views.api -> products.logs.backend.log_attributes_query_runner",
+ "products.logs.backend.presentation.views.api -> products.logs.backend.log_values_query_runner",
+ "products.logs.backend.presentation.views.api -> products.logs.backend.logs_query_runner",
+ "products.logs.backend.presentation.views.api -> products.logs.backend.services_query_runner",
+ "products.logs.backend.presentation.views.api -> products.logs.backend.sparkline_query_runner",
+ "products.logs.backend.presentation.views.alerts_api -> products.logs.backend.alert_check_query",
+ "products.logs.backend.presentation.views.alerts_api -> products.logs.backend.alert_destinations",
+ "products.logs.backend.presentation.views.alerts_api -> products.logs.backend.alert_state_machine",
+ "products.logs.backend.presentation.views.alerts_api -> products.logs.backend.models",
+ "products.logs.backend.presentation.views.sampling_api -> products.logs.backend.models",
+ "products.logs.backend.presentation.views.views_api -> products.logs.backend.models",
+ # logs presentation isolation (temporary): cross-product imports the moved viewsets
+ # still make directly. These resolve once cdp/exports expose the needed facades, so
+ # they outlive the in-product cleanup above.
+ "products.logs.backend.presentation.views.api -> products.exports.backend.models.exported_asset",
+ "products.logs.backend.presentation.views.alerts_api -> products.cdp.backend.api.hog_function",
+ "products.logs.backend.presentation.views.alerts_api -> products.cdp.backend.models.hog_functions.hog_function",
]
[tool.ty.rules]