Polish documentation formatting
This commit is contained in:
parent
b8d1fe3c84
commit
18dcf31aa6
|
|
@ -1236,19 +1236,19 @@ Example:
|
|||
|
||||
[source,java,indent=0]
|
||||
----
|
||||
@Bean
|
||||
@ExportMetricWriter
|
||||
MetricWriter metricWriter(MetricExportProperties export) {
|
||||
@Bean
|
||||
@ExportMetricWriter
|
||||
MetricWriter metricWriter(MetricExportProperties export) {
|
||||
return new RedisMetricRepository(connectionFactory,
|
||||
export.getRedis().getPrefix(), export.getRedis().getKey());
|
||||
}
|
||||
}
|
||||
----
|
||||
|
||||
.application.properties
|
||||
[source,properties]
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
spring.metrics.export.redis.prefix: metrics.mysystem.${spring.application.name:application}.${random.value:0000}
|
||||
spring.metrics.export.redis.key: keys.metrics.mysystem
|
||||
spring.metrics.export.redis.prefix: metrics.mysystem.${spring.application.name:application}.${random.value:0000}
|
||||
spring.metrics.export.redis.key: keys.metrics.mysystem
|
||||
----
|
||||
|
||||
The prefix is constructed with the application name and id at the end, so it can easily be used
|
||||
|
|
@ -1287,8 +1287,8 @@ Example:
|
|||
|
||||
[source,indent=0]
|
||||
----
|
||||
curl localhost:4242/api/query?start=1h-ago&m=max:counter.status.200.root
|
||||
[
|
||||
curl localhost:4242/api/query?start=1h-ago&m=max:counter.status.200.root
|
||||
[
|
||||
{
|
||||
"metric": "counter.status.200.root",
|
||||
"tags": {
|
||||
|
|
@ -1301,7 +1301,7 @@ curl localhost:4242/api/query?start=1h-ago&m=max:counter.status.200.root
|
|||
"1430492875": 6
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
----
|
||||
|
||||
|
||||
|
|
@ -1320,14 +1320,14 @@ Alternatively, you can provide a `@Bean` of type `StatsdMetricWriter` and mark i
|
|||
|
||||
[source,java,indent=0]
|
||||
----
|
||||
@Value("${spring.application.name:application}.${random.value:0000}")
|
||||
private String prefix = "metrics";
|
||||
@Value("${spring.application.name:application}.${random.value:0000}")
|
||||
private String prefix = "metrics";
|
||||
|
||||
@Bean
|
||||
@ExportMetricWriter
|
||||
MetricWriter metricWriter() {
|
||||
@Bean
|
||||
@ExportMetricWriter
|
||||
MetricWriter metricWriter() {
|
||||
return new StatsdMetricWriter(prefix, "localhost", 8125);
|
||||
}
|
||||
}
|
||||
----
|
||||
|
||||
|
||||
|
|
@ -1343,11 +1343,11 @@ Example:
|
|||
|
||||
[source,java,indent=0]
|
||||
----
|
||||
@Bean
|
||||
@ExportMetricWriter
|
||||
MetricWriter metricWriter(MBeanExporter exporter) {
|
||||
@Bean
|
||||
@ExportMetricWriter
|
||||
MetricWriter metricWriter(MBeanExporter exporter) {
|
||||
return new JmxMetricWriter(exporter);
|
||||
}
|
||||
}
|
||||
----
|
||||
|
||||
Each metric is exported as an individual MBean. The format for the `ObjectNames` is given
|
||||
|
|
@ -1455,7 +1455,7 @@ and obtain basic information about the last 100 requests:
|
|||
|
||||
[source,json,indent=0]
|
||||
----
|
||||
[{
|
||||
[{
|
||||
"timestamp": 1394343677415,
|
||||
"info": {
|
||||
"method": "GET",
|
||||
|
|
|
|||
Loading…
Reference in New Issue