diff --git a/typescript/infra/scripts/funding/fund-relayers-from-deployer.ts b/typescript/infra/scripts/funding/fund-relayers-from-deployer.ts index 6293f1a3f..9c867d873 100644 --- a/typescript/infra/scripts/funding/fund-relayers-from-deployer.ts +++ b/typescript/infra/scripts/funding/fund-relayers-from-deployer.ts @@ -188,7 +188,7 @@ async function main() { ); } - await submitMetrics(metricsRegister); + await submitMetrics(metricsRegister, 'relayer-funder'); if (failureOccurred) { error('At least one failure occurred when funding relayers'); diff --git a/typescript/infra/scripts/helloworld/kathy.ts b/typescript/infra/scripts/helloworld/kathy.ts index 73edd31f0..b3a565ade 100644 --- a/typescript/infra/scripts/helloworld/kathy.ts +++ b/typescript/infra/scripts/helloworld/kathy.ts @@ -72,7 +72,7 @@ async function main() { } } - await submitMetrics(metricsRegister); + await submitMetrics(metricsRegister, 'kathy'); if (failureOccurred) { console.error('Failure occurred at least once'); diff --git a/typescript/infra/src/utils/metrics.ts b/typescript/infra/src/utils/metrics.ts index d5ea726c1..ab95d1c42 100644 --- a/typescript/infra/src/utils/metrics.ts +++ b/typescript/infra/src/utils/metrics.ts @@ -12,11 +12,11 @@ function getPushGateway(register: Registry): Pushgateway | null { } } -export async function submitMetrics(register: Registry) { +export async function submitMetrics(register: Registry, jobName: string) { const gateway = getPushGateway(register); if (!gateway) return; - const { resp } = await gateway.push({ jobName: 'kathy' }); + const { resp } = await gateway.push({ jobName }); const statusCode = typeof resp == 'object' && resp != null && 'statusCode' in resp ? (resp as any).statusCode