Skip to content

Commit

Permalink
api: add runtime to prometheus metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed Jan 18, 2024
1 parent a199122 commit 24b0c5e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions api/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ func (hs HostState) PrometheusMetric() []prometheus.Metric {
"commit": hs.Commit,
"os": hs.OS,
"build_time": hs.BuildTime,
"start_time": hs.StartTime,
},
},
{
Name: "hostd_start_time",
Value: 1,
Timestamp: hs.StartTime,
Name: "hostd_runtime",
Value: float64(time.Since(hs.StartTime).Milliseconds()),
Timestamp: time.Now(),
},
{
Name: "hostd_last_announcement",
Expand Down

0 comments on commit 24b0c5e

Please sign in to comment.