Include languages in start-proxy telemetry

This commit is contained in:
Michael B. Gale
2025-10-08 13:01:25 +01:00
parent 2ff418f28a
commit fb148789ab
2 changed files with 11 additions and 3 deletions
+5 -2
View File
@@ -95754,12 +95754,12 @@ function generateCertificateAuthority() {
const key = import_node_forge.pki.privateKeyToPem(keys.privateKey);
return { cert: pem, key };
}
async function sendSuccessStatusReport(startedAt, registry_types, logger) {
async function sendSuccessStatusReport(startedAt, config, registry_types, logger) {
const statusReportBase = await createStatusReportBase(
"start-proxy" /* StartProxy */,
"success",
startedAt,
void 0,
config,
await checkDiskUsage(logger),
logger
);
@@ -95804,6 +95804,9 @@ async function runWrapper() {
await startProxy(proxyBin, proxyConfig, proxyLogFilePath, logger);
await sendSuccessStatusReport(
startedAt,
{
languages: language ? [language] : []
},
proxyConfig.all_credentials.map((c) => c.type),
logger
);
+6 -1
View File
@@ -7,6 +7,7 @@ import { pki } from "node-forge";
import * as actionsUtil from "./actions-util";
import { getApiDetails, getAuthorizationHeaderFor } from "./api-client";
import { Config } from "./config-utils";
import { getActionsLogger, Logger } from "./logging";
import {
Credential,
@@ -99,6 +100,7 @@ interface StartProxyStatus extends StatusReportBase {
async function sendSuccessStatusReport(
startedAt: Date,
config: Partial<Config>,
registry_types: string[],
logger: Logger,
) {
@@ -106,7 +108,7 @@ async function sendSuccessStatusReport(
ActionName.StartProxy,
"success",
startedAt,
undefined,
config,
await util.checkDiskUsage(logger),
logger,
);
@@ -168,6 +170,9 @@ async function runWrapper() {
// Report success if we have reached this point.
await sendSuccessStatusReport(
startedAt,
{
languages: language ? [language] : [],
},
proxyConfig.all_credentials.map((c) => c.type),
logger,
);