File tree Expand file tree Collapse file tree
apps/webapp/app/v3/services/worker Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,12 +62,17 @@ if (workloadCreatedAtGateEnabled && !workloadTokenCutoff) {
6262
6363type WorkloadGateAction = "start" | "complete" | "continue" | "snapshots_since" ;
6464
65- const workloadAuthGateCounter = new Counter ( {
66- name : "workload_auth_gate_total" ,
67- help : "Deployment token authorization outcomes on worker actions" ,
68- labelNames : [ "outcome" , "action" ] as const ,
69- registers : [ metricsRegister ] ,
70- } ) ;
65+ // singleton: module-scope registration double-registers under dev HMR
66+ const workloadAuthGateCounter = singleton (
67+ "workloadAuthGateCounter" ,
68+ ( ) =>
69+ new Counter ( {
70+ name : "workload_auth_gate_total" ,
71+ help : "Deployment token authorization outcomes on worker actions" ,
72+ labelNames : [ "outcome" , "action" ] as const ,
73+ registers : [ metricsRegister ] ,
74+ } )
75+ ) ;
7176
7277function createAuthenticatedWorkerInstanceCache ( ) {
7378 return createCache ( {
You can’t perform that action at this time.
0 commit comments