@@ -252,31 +252,31 @@ var (
252252 workerRequests = prometheus .NewCounterVec (prometheus.CounterOpts {
253253 Name : workerRequestsMetricName .String (),
254254 Help : "Number of requests sent to worker by script name" ,
255- }, []string {"script_name" , "account" , "status" },
255+ }, []string {"script_name" , "dispatch_namespace" , " account" , "status" },
256256 )
257257
258258 workerErrors = prometheus .NewCounterVec (prometheus.CounterOpts {
259259 Name : workerErrorsMetricName .String (),
260260 Help : "Number of errors by script name" ,
261- }, []string {"script_name" , "account" , "status" },
261+ }, []string {"script_name" , "dispatch_namespace" , " account" , "status" },
262262 )
263263
264264 workerCPUTime = prometheus .NewGaugeVec (prometheus.GaugeOpts {
265265 Name : workerCPUTimeMetricName .String (),
266266 Help : "CPU time quantiles by script name" ,
267- }, []string {"script_name" , "account" , "status" , "quantile" },
267+ }, []string {"script_name" , "dispatch_namespace" , " account" , "status" , "quantile" },
268268 )
269269
270270 workerDuration = prometheus .NewGaugeVec (prometheus.GaugeOpts {
271271 Name : workerDurationMetricName .String (),
272272 Help : "Duration quantiles by script name (GB*s)" ,
273- }, []string {"script_name" , "account" , "status" , "quantile" },
273+ }, []string {"script_name" , "dispatch_namespace" , " account" , "status" , "quantile" },
274274 )
275275
276276 workerWallTime = prometheus .NewGaugeVec (prometheus.GaugeOpts {
277277 Name : workerWallTimeMetricName .String (),
278278 Help : "Wall time quantiles by script name (microseconds)" ,
279- }, []string {"script_name" , "account" , "status" , "quantile" },
279+ }, []string {"script_name" , "dispatch_namespace" , " account" , "status" , "quantile" },
280280 )
281281
282282 poolHealthStatus = prometheus .NewGaugeVec (prometheus.GaugeOpts {
@@ -720,20 +720,20 @@ func fetchWorkerAnalytics(account cfaccounts.Account, wg *sync.WaitGroup) {
720720
721721 for _ , a := range r .Viewer .Accounts {
722722 for _ , w := range a .WorkersInvocationsAdaptive {
723- workerRequests .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "account" : accountName , "status" : w .Dimensions .Status }).Add (float64 (w .Sum .Requests ))
724- workerErrors .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "account" : accountName , "status" : w .Dimensions .Status }).Add (float64 (w .Sum .Errors ))
725- workerCPUTime .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P50" }).Set (float64 (w .Quantiles .CPUTimeP50 ))
726- workerCPUTime .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P75" }).Set (float64 (w .Quantiles .CPUTimeP75 ))
727- workerCPUTime .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P99" }).Set (float64 (w .Quantiles .CPUTimeP99 ))
728- workerCPUTime .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P999" }).Set (float64 (w .Quantiles .CPUTimeP999 ))
729- workerDuration .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P50" }).Set (float64 (w .Quantiles .DurationP50 ))
730- workerDuration .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P75" }).Set (float64 (w .Quantiles .DurationP75 ))
731- workerDuration .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P99" }).Set (float64 (w .Quantiles .DurationP99 ))
732- workerDuration .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P999" }).Set (float64 (w .Quantiles .DurationP999 ))
733- workerWallTime .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P50" }).Set (float64 (w .Quantiles .WallTimeP50 ))
734- workerWallTime .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P75" }).Set (float64 (w .Quantiles .WallTimeP75 ))
735- workerWallTime .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P99" }).Set (float64 (w .Quantiles .WallTimeP99 ))
736- workerWallTime .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P999" }).Set (float64 (w .Quantiles .WallTimeP999 ))
723+ workerRequests .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "dispatch_namespace" : w . Dimensions . DispatchNamespaceName , " account" : accountName , "status" : w .Dimensions .Status }).Add (float64 (w .Sum .Requests ))
724+ workerErrors .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "dispatch_namespace" : w . Dimensions . DispatchNamespaceName , " account" : accountName , "status" : w .Dimensions .Status }).Add (float64 (w .Sum .Errors ))
725+ workerCPUTime .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "dispatch_namespace" : w . Dimensions . DispatchNamespaceName , " account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P50" }).Set (float64 (w .Quantiles .CPUTimeP50 ))
726+ workerCPUTime .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "dispatch_namespace" : w . Dimensions . DispatchNamespaceName , " account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P75" }).Set (float64 (w .Quantiles .CPUTimeP75 ))
727+ workerCPUTime .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "dispatch_namespace" : w . Dimensions . DispatchNamespaceName , " account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P99" }).Set (float64 (w .Quantiles .CPUTimeP99 ))
728+ workerCPUTime .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "dispatch_namespace" : w . Dimensions . DispatchNamespaceName , " account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P999" }).Set (float64 (w .Quantiles .CPUTimeP999 ))
729+ workerDuration .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "dispatch_namespace" : w . Dimensions . DispatchNamespaceName , " account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P50" }).Set (float64 (w .Quantiles .DurationP50 ))
730+ workerDuration .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "dispatch_namespace" : w . Dimensions . DispatchNamespaceName , " account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P75" }).Set (float64 (w .Quantiles .DurationP75 ))
731+ workerDuration .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "dispatch_namespace" : w . Dimensions . DispatchNamespaceName , " account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P99" }).Set (float64 (w .Quantiles .DurationP99 ))
732+ workerDuration .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "dispatch_namespace" : w . Dimensions . DispatchNamespaceName , " account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P999" }).Set (float64 (w .Quantiles .DurationP999 ))
733+ workerWallTime .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "dispatch_namespace" : w . Dimensions . DispatchNamespaceName , " account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P50" }).Set (float64 (w .Quantiles .WallTimeP50 ))
734+ workerWallTime .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "dispatch_namespace" : w . Dimensions . DispatchNamespaceName , " account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P75" }).Set (float64 (w .Quantiles .WallTimeP75 ))
735+ workerWallTime .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "dispatch_namespace" : w . Dimensions . DispatchNamespaceName , " account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P99" }).Set (float64 (w .Quantiles .WallTimeP99 ))
736+ workerWallTime .With (prometheus.Labels {"script_name" : w .Dimensions .ScriptName , "dispatch_namespace" : w . Dimensions . DispatchNamespaceName , " account" : accountName , "status" : w .Dimensions .Status , "quantile" : "P999" }).Set (float64 (w .Quantiles .WallTimeP999 ))
737737 }
738738 }
739739}
0 commit comments