Make JMX metrics domain configurable

Closes gh-13356
This commit is contained in:
Stephane Nicoll
2018-06-05 10:12:26 +02:00
parent 571c50e43f
commit b4f8361989
5 changed files with 32 additions and 4 deletions

View File

@@ -1375,6 +1375,7 @@ content into your application. Rather, pick only the properties that you need.
management.metrics.export.influx.step=1m # Step size (i.e. reporting frequency) to use.
management.metrics.export.influx.uri=http://localhost:8086 # URI of the Influx server.
management.metrics.export.influx.user-name= # Login user of the Influx server.
management.metrics.export.jmx.domain=metrics # Metrics JMX domain name.
management.metrics.export.jmx.enabled=true # Whether exporting of metrics to JMX is enabled.
management.metrics.export.jmx.step=1m # Step size (i.e. reporting frequency) to use.
management.metrics.export.newrelic.account-id= # New Relic account ID.

View File

@@ -1470,10 +1470,17 @@ 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. Micrometer provides a default `HierarchicalNameMapper` that governs
how a dimensional meter id is
{micrometer-registry-documentation}/jmx#_hierarchical_name_mapping[mapped to flat
hierarchical names].
view metrics locally.By default, metrics are exported to the `metrics` JMX domain. The
domain to use can be provided provided using:
[source,properties,indent=0]
----
management.metrics.export.jmx.domain=com.example.app.metrics
----
Micrometer provides a default `HierarchicalNameMapper` that governs how a dimensional
meter id is {micrometer-registry-documentation}/jmx#_hierarchical_name_mapping[mapped to
flat hierarchical names].
TIP: To take control over this behaviour, define your `JmxMeterRegistry` and supply your
own `HierarchicalNameMapper`. An auto-configured `JmxConfig` and `Clock` beans are