This repository has been archived by the owner on Mar 31, 2020. It is now read-only.
Highlights
Metrics Overrides and Tag Manipulation
This release ships an additional metrics reporter that can wrap the Prometheus reporter (or, as a matter of fact, any other reporter) and perform three actions:
- Change the metric name
- Remove tags
- Rename tags
All via configuration! For example, with the following configuration:
kamon.prometheus {
metric-overrides {
"span.processing-time" {
name = "operation.duration"
delete-tags = [ "user-id" ]
rename-tags {
"operation" = "endpoint"
}
}
}
}
The span.processing-time
metric will be renamed to operation.duration
, the user-id
tag will be removed from all time series of this metric, and, the operation
tag name will be replaced by endpoint
(the tag values remain the same).
To start using the overrides functionality you will need to wrap your reporter with the MetricOverrideReporter
as shown bellow:
val promReporter = new PrometheusReporter()
val reporterWithOverrides = new MetricOverrideReporter(promReporter, overridesConfig)
Kamon.addReporter(reporterWithOverrides)
Summary
New Features
- Now you can override metric names and tags, as well as delete tags from metrics. This feature was contributed by @GlassAndOneHalf and @fazy viea #19. Thanks a lot!