Skip to content

Commit

Permalink
refactor: rename metrics to use namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
turip committed Aug 29, 2024
1 parent 929ce55 commit 50562c3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion openmeter/entitlement/balanceworker/recalculate.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (

defaultLRUCacheSize = 10_000

metricNameRecalculationTime = "balance_worker_entitlement_recalculation_time_ms"
metricNameRecalculationTime = "balance_worker.entitlement_recalculation_time_ms"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions openmeter/watermill/grouphandler/grouphandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
)

const (
meterNameHandlerMessageCount = "grouphandler_message_count"
meterNameHandlerProcessingTime = "grouphandler_processing_time_ms"
meterNameHandlerMessageCount = "watermill.grouphandler.message_count"
meterNameHandlerProcessingTime = "watermill.grouphandler.processing_time_ms"
)

var (
Expand Down
8 changes: 4 additions & 4 deletions openmeter/watermill/router/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
const (
unkonwnEventType = "UNKNOWN"

messageHandlerProcessingTimeMetricName = "message_handler_processing_time_ms"
messageHandlerMessageCountMetricName = "message_handler_message_count"
messageHandlerProcessingTimeMetricName = "watermill.router.message_handler.processing_time_ms"
messageHandlerMessageCountMetricName = "watermill.router.message_handler.message_count"
)

var (
Expand Down Expand Up @@ -78,8 +78,8 @@ func HandlerMetrics(metricMeter metric.Meter, prefix string, log *slog.Logger) (
}

const (
messageProcessingCountMetricName = "message_processing_count"
messageProcessingTimeMetricName = "message_processing_time_ms"
messageProcessingCountMetricName = "watermill.router.message_processing_count"
messageProcessingTimeMetricName = "watermill.router.message_processing_time_ms"
)

func DLQMetrics(metricMeter metric.Meter, prefix string, log *slog.Logger) (func(message.HandlerFunc) message.HandlerFunc, error) {
Expand Down

0 comments on commit 50562c3

Please sign in to comment.