From 5f66e56b1264eba317037010c5df8ed866fba561 Mon Sep 17 00:00:00 2001 From: Anirudh Pillai Date: Tue, 20 Aug 2024 16:14:00 +0100 Subject: [PATCH] fix: endpoint names for monitoring --- posthog/api/dashboards/dashboard.py | 2 +- posthog/api/insight.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/posthog/api/dashboards/dashboard.py b/posthog/api/dashboards/dashboard.py index b4d25a007c30e..8462aec010f45 100644 --- a/posthog/api/dashboards/dashboard.py +++ b/posthog/api/dashboards/dashboard.py @@ -262,7 +262,7 @@ def _deep_duplicate_tiles(self, dashboard: Dashboard, existing_tile: DashboardTi color=existing_tile.color, ) - @monitor(feature=Feature.DASHBOARD, endpoint="update", method="PATCH") + @monitor(feature=Feature.DASHBOARD, endpoint="dashboard", method="PATCH") def update(self, instance: Dashboard, validated_data: dict, *args: Any, **kwargs: Any) -> Dashboard: can_user_restrict = self.user_permissions.dashboard(instance).can_restrict if "restriction_level" in validated_data and not can_user_restrict: diff --git a/posthog/api/insight.py b/posthog/api/insight.py index 7711561374c3c..0406cd6e1abce 100644 --- a/posthog/api/insight.py +++ b/posthog/api/insight.py @@ -370,7 +370,7 @@ def create(self, validated_data: dict, *args: Any, **kwargs: Any) -> Insight: return insight @transaction.atomic() - @monitor(feature=Feature.INSIGHT, endpoint="insight", method="POST") + @monitor(feature=Feature.INSIGHT, endpoint="insight", method="PATCH") def update(self, instance: Insight, validated_data: dict, **kwargs) -> Insight: dashboards_before_change: list[Union[str, dict]] = [] try: