Skip to content

Commit

Permalink
feat: Add repoid and release to version metric
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Corbes <[email protected]>
  • Loading branch information
lcaflc committed Jun 25, 2024
1 parent 528c561 commit 5ac4f6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var (
version = prometheus.NewDesc(
prometheus.BuildFQName(promNamespace, "", "version"),
"Version of the PBS installation.",
[]string{"version"}, nil,
[]string{"version", "repoid", "release"}, nil,
)
available = prometheus.NewDesc(
prometheus.BuildFQName(promNamespace, "", "available"),
Expand Down Expand Up @@ -443,7 +443,7 @@ func (e *Exporter) getVersion(ch chan<- prometheus.Metric) error {
}

ch <- prometheus.MustNewConstMetric(
version, prometheus.GaugeValue, 1, response.Data.Version,
version, prometheus.GaugeValue, 1, response.Data.Version, response.Data.Repoid, response.Data.Release,
)

return nil
Expand Down

0 comments on commit 5ac4f6c

Please sign in to comment.