Skip to content

Commit

Permalink
chore: remove kube list telemetry
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
deboer-tim committed May 2, 2024
1 parent 4e431be commit d37edf8
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/main/src/plugin/kubernetes-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,6 @@ export class KubernetesClient {
}

async listNamespacedPod(namespace: string, fieldSelector?: string, labelSelector?: string): Promise<V1PodList> {
let telemetryOptions = {};
const k8sApi = this.kubeConfig.makeApiClient(CoreV1Api);
try {
const res = await k8sApi.listNamespacedPod(
Expand All @@ -562,10 +561,7 @@ export class KubernetesClient {
};
}
} catch (error) {
telemetryOptions = { error: error };
throw this.wrapK8sClientError(error);
} finally {
this.telemetry.track('kubernetesListNamespacePod', telemetryOptions);
}
}

Expand Down Expand Up @@ -849,7 +845,6 @@ export class KubernetesClient {
}

async listNamespaces(): Promise<V1NamespaceList> {
let telemetryOptions = {};
try {
const k8sApi = this.kubeConfig.makeApiClient(CoreV1Api);
const res = await k8sApi.listNamespace();
Expand All @@ -861,10 +856,7 @@ export class KubernetesClient {
};
}
} catch (error) {
telemetryOptions = { error: error };
throw this.wrapK8sClientError(error);
} finally {
this.telemetry.track('kubernetesListNamespaces', telemetryOptions);
}
}

Expand Down

0 comments on commit d37edf8

Please sign in to comment.