From 27b447d120eea3353ecd1409f5bbdaa17f82a135 Mon Sep 17 00:00:00 2001 From: "Brandon Waterloo [MSFT]" <36966225+bwateratmsft@users.noreply.github.com> Date: Wed, 6 May 2020 10:47:51 -0400 Subject: [PATCH] Fix telemetry error (#1946) --- src/commands/containers/browseContainer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/containers/browseContainer.ts b/src/commands/containers/browseContainer.ts index e58e61017f..024bbc133c 100644 --- a/src/commands/containers/browseContainer.ts +++ b/src/commands/containers/browseContainer.ts @@ -12,7 +12,7 @@ import { ContainerTreeItem } from "../../tree/containers/ContainerTreeItem"; import { callDockerodeWithErrorHandling } from '../../utils/callDockerode'; import { captureCancelStep } from '../../utils/captureCancelStep'; -type BrowseTelemetryProperties = TelemetryProperties & { possiblePorts?: number[], selectedPort?: number }; +type BrowseTelemetryProperties = TelemetryProperties & { possiblePorts?: string, selectedPort?: number }; type ConfigureBrowseCancelStep = 'node' | 'port'; @@ -80,7 +80,7 @@ export async function browseContainer(context: IActionContext, node?: ContainerT // Exclude ports not mapped to the host... .filter(port => port.mappings && port.mappings.length > 0); - telemetryProperties.possiblePorts = possiblePorts.map(port => port.containerPort.port); + telemetryProperties.possiblePorts = possiblePorts.map(port => port.containerPort.port).toString(); if (possiblePorts.length === 0) { /* eslint-disable-next-line @typescript-eslint/no-floating-promises */