From 43db2c064ca6c19f843f4791c5cfa3fc73138669 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Tue, 13 Oct 2026 19:12:13 +0100 Subject: [PATCH] Include proxy version in telemetry --- lib/entry-points.js | 6 ++++-- src/start-proxy-action.ts | 1 + src/start-proxy/status-report.ts | 15 ++++++++++++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/lib/entry-points.js b/lib/entry-points.js index 00309ef50..d4c353c9f 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -187528,7 +187528,7 @@ var toolcache4 = __toESM(require_tool_cache()); // src/start-proxy/status-report.ts var core23 = __toESM(require_core()); -async function sendSuccessStatusReport(startedAt, config, registry_types, logger2) { +async function sendSuccessStatusReport(startedAt, config, registry_types, status, logger2) { const statusReportBase = await createStatusReportBase( "start-proxy" /* StartProxy */, "success", @@ -187540,7 +187540,8 @@ async function sendSuccessStatusReport(startedAt, config, registry_types, logger if (statusReportBase !== void 0) { const statusReport = { ...statusReportBase, - registry_types: registry_types.join(",") + registry_types: registry_types.join(","), + start_proxy: status }; await sendStatusReport(statusReport); } @@ -188250,6 +188251,7 @@ async function run7(action) { languages: language === void 0 ? void 0 : [language] }, proxyConfig.all_credentials.map((c) => c.type), + { proxy_version: proxyBin.version }, logger2 ); } catch (unwrappedError) { diff --git a/src/start-proxy-action.ts b/src/start-proxy-action.ts index 9f96e1503..8a5f5af14 100644 --- a/src/start-proxy-action.ts +++ b/src/start-proxy-action.ts @@ -122,6 +122,7 @@ async function run(action: ActionState<["Base", "Logger", "Env", "Actions"]>) { languages: language === undefined ? undefined : [language], }, proxyConfig.all_credentials.map((c) => c.type), + { proxy_version: proxyBin.version }, logger, ); } catch (unwrappedError) { diff --git a/src/start-proxy/status-report.ts b/src/start-proxy/status-report.ts index 081078034..685be3dbe 100644 --- a/src/start-proxy/status-report.ts +++ b/src/start-proxy/status-report.ts @@ -12,18 +12,30 @@ import { } from "../status-report"; import * as util from "../util"; +/** Additional status report data from `start-proxy`. */ +export interface StartProxyStatus { + proxy_version: string; +} + +/** The type of successful status reports from `start-proxy`. */ +type StartProxySuccessReport = StatusReportBase & { + start_proxy: StartProxyStatus; +}; + /** * Sends a status report for the `start-proxy` action indicating a successful outcome. * * @param startedAt When the action was started. * @param config The configuration used. * @param registry_types The types of registries that are configured. + * @param status Status information. * @param logger The logger to use. */ export async function sendSuccessStatusReport( startedAt: Date, config: Partial, registry_types: string[], + status: StartProxyStatus, logger: Logger, ) { const statusReportBase = await createStatusReportBase( @@ -35,9 +47,10 @@ export async function sendSuccessStatusReport( logger, ); if (statusReportBase !== undefined) { - const statusReport: StatusReportBase = { + const statusReport: StartProxySuccessReport = { ...statusReportBase, registry_types: registry_types.join(","), + start_proxy: status, }; await sendStatusReport(statusReport); }