From f63c82b5e93d4f6baaa1a088f649c9035ea70dbe Mon Sep 17 00:00:00 2001 From: F-G Fernandez <26927750+frgfm@users.noreply.github.com> Date: Fri, 27 Oct 2023 17:52:29 +0200 Subject: [PATCH] feat: Adds telemetry in repo fetching --- src/app/api/api_v1/endpoints/repos.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/api/api_v1/endpoints/repos.py b/src/app/api/api_v1/endpoints/repos.py index 3e4224c..883bf3c 100644 --- a/src/app/api/api_v1/endpoints/repos.py +++ b/src/app/api/api_v1/endpoints/repos.py @@ -56,6 +56,7 @@ async def fetch_repos( user=Security(get_current_user, scopes=[UserScope.USER, UserScope.ADMIN]), ) -> List[Repository]: entries = await repos.fetch_all() if user.scope == UserScope.ADMIN else await repos.fetch_all(("owner_id", user.id)) + analytics_client.capture(user.id, event="repo-fetch") return [elt for elt in entries]