diff --git a/pkg/rotation/stats_reporter.go b/pkg/rotation/stats_reporter.go index 509c73b1d..cadb8462e 100644 --- a/pkg/rotation/stats_reporter.go +++ b/pkg/rotation/stats_reporter.go @@ -49,12 +49,12 @@ type StatsReporter interface { func newStatsReporter() (StatsReporter, error) { var err error r := &reporter{} - meter := global.Meter("rotation") + meter := global.Meter("secretsstore") - if r.rotationReconcileTotal, err = meter.Int64Counter("total_rotation_reconcile", instrument.WithDescription("Total number of rotation reconciles")); err != nil { + if r.rotationReconcileTotal, err = meter.Int64Counter("rotation_reconcile", instrument.WithDescription("Total number of rotation reconciles")); err != nil { return nil, err } - if r.rotationReconcileErrorTotal, err = meter.Int64Counter("total_rotation_reconcile_error", instrument.WithDescription("Total number of rotation reconciles with error")); err != nil { + if r.rotationReconcileErrorTotal, err = meter.Int64Counter("rotation_reconcile_error", instrument.WithDescription("Total number of rotation reconciles with error")); err != nil { return nil, err } if r.rotationReconcileDuration, err = meter.Float64Histogram("rotation_reconcile_duration_sec", instrument.WithDescription("Distribution of how long it took to rotate secrets-store content for pods")); err != nil { diff --git a/pkg/secrets-store/stats_reporter.go b/pkg/secrets-store/stats_reporter.go index 4dabb45b0..4daeec74e 100644 --- a/pkg/secrets-store/stats_reporter.go +++ b/pkg/secrets-store/stats_reporter.go @@ -56,22 +56,22 @@ func NewStatsReporter() (StatsReporter, error) { r := &reporter{} meter := global.Meter("secretsstore") - if r.nodePublishTotal, err = meter.Int64Counter("total_node_publish", instrument.WithDescription("Total number of node publish calls")); err != nil { + if r.nodePublishTotal, err = meter.Int64Counter("node_publish", instrument.WithDescription("Total number of node publish calls")); err != nil { return nil, err } - if r.nodeUnPublishTotal, err = meter.Int64Counter("total_node_unpublish", instrument.WithDescription("Total number of node unpublish calls")); err != nil { + if r.nodeUnPublishTotal, err = meter.Int64Counter("node_unpublish", instrument.WithDescription("Total number of node unpublish calls")); err != nil { return nil, err } - if r.nodePublishErrorTotal, err = meter.Int64Counter("total_node_publish_error", instrument.WithDescription("Total number of node publish calls with error")); err != nil { + if r.nodePublishErrorTotal, err = meter.Int64Counter("node_publish_error", instrument.WithDescription("Total number of node publish calls with error")); err != nil { return nil, err } - if r.nodeUnPublishErrorTotal, err = meter.Int64Counter("total_node_unpublish_error", instrument.WithDescription("Total number of node unpublish calls with error")); err != nil { + if r.nodeUnPublishErrorTotal, err = meter.Int64Counter("node_unpublish_error", instrument.WithDescription("Total number of node unpublish calls with error")); err != nil { return nil, err } - if r.syncK8sSecretTotal, err = meter.Int64Counter("total_sync_k8s_secret", instrument.WithDescription("Total number of k8s secrets synced")); err != nil { + if r.syncK8sSecretTotal, err = meter.Int64Counter("sync_k8s_secret", instrument.WithDescription("Total number of k8s secrets synced")); err != nil { return nil, err } - if r.syncK8sSecretDuration, err = meter.Float64Histogram("sync_k8s_secret_duration_sec", instrument.WithDescription("Distribution of how long it took to sync k8s secret")); err != nil { + if r.syncK8sSecretDuration, err = meter.Float64Histogram("k8s_secret_duration_sec", instrument.WithDescription("Distribution of how long it took to sync k8s secret")); err != nil { return nil, err } return r, nil