From d37edf8172537dbc33c9ffeee5e00bf274b51614 Mon Sep 17 00:00:00 2001 From: Tim deBoer Date: Tue, 30 Apr 2024 16:13:08 -0400 Subject: [PATCH] chore: remove kube list telemetry kubernetesListNamespacePod is the single most common event sent in telemetry by far, and responsible for a significant portion of our events. It doesn't really tell us anything (we had access to pods on a namespace) compared with other events like reading individual items or modifying them, and even logging the errors isn't giving anything useful: they are infrequent in comparison and the vast majority are obvious access errors like the namespace wasn't accessible. Instead of trying to limit or change what we log, it seems prudent to just remove it. kubernetesListNamespaces isn't called nearly as much, but since it is the only other list* tracking it seems like it should be removed to be consistent. Signed-off-by: Tim deBoer --- packages/main/src/plugin/kubernetes-client.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/main/src/plugin/kubernetes-client.ts b/packages/main/src/plugin/kubernetes-client.ts index 67dc77412cffc..417b2186f01ab 100644 --- a/packages/main/src/plugin/kubernetes-client.ts +++ b/packages/main/src/plugin/kubernetes-client.ts @@ -543,7 +543,6 @@ export class KubernetesClient { } async listNamespacedPod(namespace: string, fieldSelector?: string, labelSelector?: string): Promise { - let telemetryOptions = {}; const k8sApi = this.kubeConfig.makeApiClient(CoreV1Api); try { const res = await k8sApi.listNamespacedPod( @@ -562,10 +561,7 @@ export class KubernetesClient { }; } } catch (error) { - telemetryOptions = { error: error }; throw this.wrapK8sClientError(error); - } finally { - this.telemetry.track('kubernetesListNamespacePod', telemetryOptions); } } @@ -849,7 +845,6 @@ export class KubernetesClient { } async listNamespaces(): Promise { - let telemetryOptions = {}; try { const k8sApi = this.kubeConfig.makeApiClient(CoreV1Api); const res = await k8sApi.listNamespace(); @@ -861,10 +856,7 @@ export class KubernetesClient { }; } } catch (error) { - telemetryOptions = { error: error }; throw this.wrapK8sClientError(error); - } finally { - this.telemetry.track('kubernetesListNamespaces', telemetryOptions); } }