From d0f1bda0b852a5ed139782d956bf2f9c4605ff74 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Sun, 29 Dec 2019 16:36:57 -0500 Subject: [PATCH] job prometheus endpoint: drop nixname, too variable --- src/lib/Hydra/Controller/Job.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/Hydra/Controller/Job.pm b/src/lib/Hydra/Controller/Job.pm index 50dc0e94..1b36e41f 100644 --- a/src/lib/Hydra/Controller/Job.pm +++ b/src/lib/Hydra/Controller/Job.pm @@ -42,23 +42,21 @@ sub prometheus : Chained('job') PathPart('prometheus') Args(0) { $prometheus->new_counter( name => "hydra_job_completion_time", help => "The most recent job's completion time", - labels => [ "project", "jobset", "job", "nixname" ] + labels => [ "project", "jobset", "job" ] )->labels( $c->stash->{project}->name, $c->stash->{jobset}->name, $c->stash->{job}->name, - $lastBuild->nixname, )->inc($lastBuild->stoptime); $prometheus->new_gauge( name => "hydra_job_failed", help => "Record if the most recent version of this job failed (1 means failed)", - labels => [ "project", "jobset", "job", "nixname" ] + labels => [ "project", "jobset", "job" ] )->labels( $c->stash->{project}->name, $c->stash->{jobset}->name, $c->stash->{job}->name, - $lastBuild->nixname, )->inc($lastBuild->buildstatus > 0); $c->stash->{'plain'} = { data => $prometheus->render };