Remove HierarchicalNameMapper as a configured @Bean
HierarchicalNameMapper is not a component that can be shared amongst multiple monitoring systems. See gh-12683
This commit is contained in:
committed by
Stephane Nicoll
parent
7c36c00331
commit
8572a091b8
@@ -1435,7 +1435,19 @@ to use can be provided using:
|
||||
management.metrics.export.graphite.port=9004
|
||||
----
|
||||
|
||||
Micrometer provides a default `HierarchicalNameMapper` that governs
|
||||
how a dimensional meter id is mapped to flat hierarchical names.
|
||||
|
||||
TIP: To take control over this behaviour, define your `GraphiteMeterRegistry` and supply your
|
||||
own `HierarchicalNameMapper`.
|
||||
|
||||
[source,java]
|
||||
----
|
||||
@Bean
|
||||
public GraphiteMeterRegistry graphiteMeterRegistry(GraphiteConfig config, Clock clock) {
|
||||
return new GraphiteMeterRegistry(config, clock, MY_HIERARCHICAL_MAPPER);
|
||||
}
|
||||
----
|
||||
|
||||
[[production-ready-metrics-export-influx]]
|
||||
==== Influx
|
||||
@@ -1454,12 +1466,19 @@ server] to use can be provided using:
|
||||
==== JMX
|
||||
Micrometer provides a hierarchical mapping to
|
||||
{micrometer-registry-documentation}/jmx[JMX], primarily as a cheap and portable way to
|
||||
view metrics locally. Spring Boot provides a default `HierarchicalNameMapper` that governs
|
||||
view metrics locally. Micrometer provides a default `HierarchicalNameMapper` that governs
|
||||
how a dimensional meter id is mapped to flat hierarchical names.
|
||||
|
||||
TIP: To take control over this behaviour, define your own `HierarchicalNameMapper` bean.
|
||||
|
||||
TIP: To take control over this behaviour, define your `JmxMeterRegistry` and supply your
|
||||
own `HierarchicalNameMapper`.
|
||||
|
||||
[source,java]
|
||||
----
|
||||
@Bean
|
||||
public JmxMeterRegistry jmxMeterRegistry(JmxConfig config, Clock clock) {
|
||||
return new JmxMeterRegistry(config, clock, MY_HIERARCHICAL_MAPPER);
|
||||
}
|
||||
----
|
||||
|
||||
[[production-ready-metrics-export-newrelic]]
|
||||
==== New Relic
|
||||
|
||||
Reference in New Issue
Block a user