Skip to content

Commit 8fa73cb

Browse files
committed
Change the names of the telemetry events
Prefix existing events with `xml_`. Group the binary download events into `xml_binary_download`. Add a parameter `binary_download_succeeded` that indicates if the download failed or worked. Signed-off-by: David Thompson <davthomp@redhat.com>
1 parent a66eae7 commit 8fa73cb

File tree

3 files changed

+29
-24
lines changed

3 files changed

+29
-24
lines changed

package-lock.json

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/server/binary/binaryServerStarter.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,15 @@ async function downloadBinary(): Promise<string> {
112112
});
113113
});
114114
downloadPromise.then((_binaryPath) => {
115-
Telemetry.sendTelemetry(Telemetry.BINARY_DOWNLOAD_SUCCEEDED_EVT);
115+
const data: any = {};
116+
data[Telemetry.BINARY_DOWNLOAD_SUCCEEDED_PROP] = true;
117+
Telemetry.sendTelemetry(Telemetry.BINARY_DOWNLOAD_EVT, data);
116118
});
117119
downloadPromise.catch(e => {
118120
if (e !== ABORTED_ERROR) {
119-
Telemetry.sendTelemetry(Telemetry.BINARY_DOWNLOAD_FAILED_EVT);
121+
const data: any = {};
122+
data[Telemetry.BINARY_DOWNLOAD_SUCCEEDED_PROP] = false;
123+
Telemetry.sendTelemetry(Telemetry.BINARY_DOWNLOAD_EVT, data);
120124
}
121125
});
122126
return downloadPromise;

src/telemetry.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ import { getTelemetryService, TelemetryEvent, TelemetryService } from "@redhat-d
55
*/
66
export namespace Telemetry {
77

8-
export const OPEN_JAVA_DOWNLOAD_LINK_EVT: string = "open_java_download_link";
9-
export const SETTINGS_EVT: string = "settings";
10-
export const BINARY_DOWNLOAD_SUCCEEDED_EVT: string = "binary_download_succeeded";
11-
export const BINARY_DOWNLOAD_FAILED_EVT: string = "binary_download_failed";
8+
export const OPEN_JAVA_DOWNLOAD_LINK_EVT: string = "xml_open_java_download_link";
9+
export const SETTINGS_EVT: string = "xml_settings";
10+
export const BINARY_DOWNLOAD_EVT: string = "xml_binary_download";
11+
12+
export const BINARY_DOWNLOAD_SUCCEEDED_PROP: string = "binary_download_succeeded";
1213

1314
let _telemetryManager: TelemetryService = null;
1415

0 commit comments

Comments
 (0)