From cb41e49a978c43d7f6d353384c560c0e64388e7a Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Mon, 12 Aug 2024 18:23:48 -0700 Subject: [PATCH] chore: add telemetry to index rebuild --- gui/src/components/loaders/IndexingProgressBar.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gui/src/components/loaders/IndexingProgressBar.tsx b/gui/src/components/loaders/IndexingProgressBar.tsx index 530fbaf33f..cfbb63bb31 100644 --- a/gui/src/components/loaders/IndexingProgressBar.tsx +++ b/gui/src/components/loaders/IndexingProgressBar.tsx @@ -14,6 +14,7 @@ import { setDialogMessage, setShowDialog, } from "../../redux/slices/uiStateSlice"; +import { usePostHog } from "posthog-js/react"; const STATUS_COLORS = { DISABLED: lightGray, // light gray @@ -76,6 +77,7 @@ const IndexingProgressBar = ({ }: ProgressBarProps) => { const dispatch = useDispatch(); const ideMessenger = useContext(IdeMessengerContext); + const posthog = usePostHog(); const [paused, setPaused] = useState(undefined); const [hovered, setHovered] = useState(false); @@ -134,6 +136,7 @@ const IndexingProgressBar = ({ "less reliable for persistent issues." } onConfirm={() => { + posthog.capture("rebuild_index_clicked"); ideMessenger.post("index/forceReIndex", { shouldClearIndexes: true, });