Skip to content

Commit

Permalink
fix(metrics)!: make timestamp metrics have _timestamp_seconds suffix
Browse files Browse the repository at this point in the history
This is more in line with upstream naming conventions.
  • Loading branch information
tjhop committed Aug 8, 2024
1 parent 6304d43 commit 573e969
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/inventory/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var (

metricInventoryReloadSeconds = promauto.NewGaugeVec(
prometheus.GaugeOpts{
Name: "mango_inventory_reload_seconds",
Name: "mango_inventory_reload_timestamp_seconds",
Help: "Unix timestamp of the last successful mango inventory reload",
},
commonMetricLabels,
Expand Down
8 changes: 4 additions & 4 deletions internal/manager/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ var (
// module run stat metrics
metricManagerModuleRunTimestamp = promauto.NewGaugeVec(
prometheus.GaugeOpts{
Name: "mango_manager_module_run_seconds",
Name: "mango_manager_module_run_timestamp_seconds",
Help: "Timestamp of the last run of the given module, in seconds since the epoch",
},
[]string{"module", "script"},
)

metricManagerModuleRunSuccessTimestamp = promauto.NewGaugeVec(
prometheus.GaugeOpts{
Name: "mango_manager_module_run_success_seconds",
Name: "mango_manager_module_run_success_timestamp_seconds",
Help: "Timestamp of the last successful run of the given module, in seconds since the epoch",
},
[]string{"module", "script"},
Expand Down Expand Up @@ -53,15 +53,15 @@ var (
// directive run stat metrics
metricManagerDirectiveRunTimestamp = promauto.NewGaugeVec(
prometheus.GaugeOpts{
Name: "mango_manager_directive_run_seconds",
Name: "mango_manager_directive_run_timestamp_seconds",
Help: "Timestamp of the last run of the given directive, in seconds since the epoch",
},
[]string{"directive"},
)

metricManagerDirectiveRunSuccessTimestamp = promauto.NewGaugeVec(
prometheus.GaugeOpts{
Name: "mango_manager_directive_run_success_seconds",
Name: "mango_manager_directive_run_success_timestamp_seconds",
Help: "Timestamp of the last successful run of the given directive, in seconds since the epoch",
},
[]string{"directive"},
Expand Down

0 comments on commit 573e969

Please sign in to comment.