Skip to content

Commit

Permalink
fix(metrics): fix missing init telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkness4 committed Jul 25, 2024
1 parent 58eb262 commit d5c9dca
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions telemetry/metrics/metrics_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,30 @@ func init() {
panic(err)
}

// PostProcessing
PostProcessing.CompletionTime, err = meter.Float64Histogram(
"post_processing.completion.time",
metric.WithDescription("Time taken to complete a post process"),
metric.WithUnit("s"),
)
if err != nil {
panic(err)
}
PostProcessing.Errors, err = meter.Int64Counter(
"post_processing.errors",
metric.WithDescription("Accumulated failed runs of post processes"),
)
if err != nil {
panic(err)
}
PostProcessing.Runs, err = meter.Int64Counter(
"post_processing.runs",
metric.WithDescription("Number of post processes"),
)
if err != nil {
panic(err)
}

// States
Watcher.State, err = meter.Int64Gauge(
"watcher.state",
Expand Down

0 comments on commit d5c9dca

Please sign in to comment.