Skip to content

Commit bef4f8d

Browse files
committed
markdown
Signed-off-by: Gregor Zeitlinger <[email protected]>
1 parent 0936b92 commit bef4f8d

File tree

21 files changed

+59
-79
lines changed

21 files changed

+59
-79
lines changed

benchmarks/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
## Benchmarks
1+
# Benchmarks
22

33
## How to Run
44

5-
```
5+
```shell
66
java -jar ./benchmarks/target/benchmarks.jar
77
```
88

99
Run only one specific benchmark:
1010

11-
```
11+
```shell
1212
java -jar ./benchmarks/target/benchmarks.jar CounterBenchmark
1313
```
1414

docs/content/config/config.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Future releases will add more options, like configuration via environment variab
1414

1515
Example:
1616

17-
```
17+
```properties
1818
io.prometheus.exporter.httpServer.port = 9401
1919
```
2020

@@ -66,13 +66,13 @@ There's one special feature about metric properties: You can set a property for
6666
metric only by specifying the metric name. Example:
6767
Let's say you have a histogram named `latency_seconds`.
6868

69-
```
69+
```properties
7070
io.prometheus.metrics.histogramClassicUpperBounds = 0.2, 0.4, 0.8, 1.0
7171
```
7272

7373
The line above sets histogram buckets for all histograms. However:
7474

75-
```
75+
```properties
7676
io.prometheus.metrics.latency_seconds.histogramClassicUpperBounds = 0.2, 0.4, 0.8, 1.0
7777
```
7878

docs/content/exporters/pushgateway.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The [PushGateway](/client_java/api/io/prometheus/metrics/exporter/pushgateway/Pu
1414
{{< tabs "uniqueid" >}}
1515
{{< tab "Gradle" >}}
1616

17-
```
17+
```groovy
1818
implementation 'io.prometheus:prometheus-metrics-core:1.3.0'
1919
implementation 'io.prometheus:prometheus-metrics-exporter-pushgateway:1.3.0'
2020
```

docs/content/getting-started/callbacks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ GaugeWithCallback.builder()
2929

3030
The resulting text format looks like this:
3131

32-
```
32+
```text
3333
# TYPE cache_size_bytes gauge
3434
# UNIT cache_size_bytes bytes
3535
# HELP cache_size_bytes Size of the cache in Bytes.

docs/content/getting-started/labels.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ weight: 3
55

66
The following shows an example of a Prometheus metric in text format:
77

8-
```
8+
```text
99
# HELP payments_total total number of payments
1010
# TYPE payments_total counter
1111
payments_total{status="error",type="paypal"} 1.0
@@ -88,7 +88,7 @@ counter.labelValues("paypal", "error").inc();
8888

8989
The data point
9090

91-
```
91+
```text
9292
payments_total{status="error",type="paypal"} 1.0
9393
```
9494

@@ -112,7 +112,7 @@ counter.initLabelValues("paypal", "error");
112112

113113
Now the four combinations will be visible from the start with initial value zero.
114114

115-
```
115+
```text
116116
# HELP payments_total total number of payments
117117
# TYPE payments_total counter
118118
payments_total{status="error",type="credit card"} 0.0

docs/content/getting-started/metric-types.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ info.setLabelValues(version, vendor, runtime);
223223

224224
The info above looks as follows in OpenMetrics text format:
225225

226-
```
226+
```text
227227
# TYPE jvm_runtime info
228228
# HELP jvm_runtime JVM runtime info
229229
jvm_runtime_info{runtime="OpenJDK Runtime Environment",vendor="Oracle Corporation",version="1.8.0_382-b05"} 1
@@ -255,7 +255,7 @@ stateSet.labelValues("dev").setTrue("feature2");
255255

256256
The OpenMetrics text format looks like this:
257257

258-
```
258+
```text
259259
# TYPE feature_flags stateset
260260
# HELP feature_flags Feature flags
261261
feature_flags{env="dev",feature_flags="feature1"} 0

docs/content/getting-started/multi-target.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public interface PrometheusScrapeRequest {
9090

9191
Sample Prometheus scrape_config
9292

93-
```
93+
```yaml
9494
- job_name: "multi-target"
9595

9696
# metrics_path defaults to '/metrics'

docs/content/getting-started/quickstart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ We use the following dependencies:
1818
{{< tabs "deps" >}}
1919
{{< tab "Gradle" >}}
2020

21-
```
21+
```groovy
2222
implementation 'io.prometheus:prometheus-metrics-core:$version'
2323
implementation 'io.prometheus:prometheus-metrics-instrumentation-jvm:$version'
2424
implementation 'io.prometheus:prometheus-metrics-exporter-httpserver:$version'
@@ -188,7 +188,7 @@ Run the application and view [http://localhost:9400/metrics](http://localhost:94
188188
your browser to see the raw metrics. You should see the `my_count_total` metric as shown below plus
189189
the `jvm_` and `process_` metrics coming from `JvmMetrics`.
190190

191-
```
191+
```text
192192
# HELP my_count_total example counter
193193
# TYPE my_count_total counter
194194
my_count_total{status="error"} 1.0

docs/content/instrumentation/caffeine.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ provided by caffeine `Cache` objects into prometheus metrics.
99
{{< tabs "uniqueid" >}}
1010
{{< tab "Gradle" >}}
1111

12-
```
12+
```groovy
1313
implementation 'io.prometheus:prometheus-metrics-instrumentation-caffeine:1.3.2'
1414
```
1515

@@ -56,7 +56,7 @@ All example metrics on this page will use the `mycache` label value.
5656

5757
For all cache instances, the following metrics will be available:
5858

59-
```
59+
```text
6060
# TYPE caffeine_cache_hit counter
6161
# HELP caffeine_cache_hit Cache hit totals
6262
caffeine_cache_hit_total{cache="mycache"} 10.0
@@ -80,7 +80,7 @@ If the cache is an instance of `LoadingCache`, i.e. it is built with a `loader`
8080
managed by the cache library, then metrics for observing load time and load failures become
8181
available:
8282

83-
```
83+
```text
8484
# TYPE caffeine_cache_load_failure counter
8585
# HELP caffeine_cache_load_failure Cache load failures
8686
caffeine_cache_load_failure_total{cache="mycache"} 10.0
@@ -97,7 +97,7 @@ caffeine_cache_load_duration_seconds_sum{cache="mycache"} 0.0034
9797

9898
Two metrics exist for observability specifically of caches that define a `weigher`:
9999

100-
```
100+
```text
101101
# TYPE caffeine_cache_eviction_weight counter
102102
# HELP caffeine_cache_eviction_weight Weight of evicted cache entries, doesn't include manually removed entries
103103
caffeine_cache_eviction_weight_total{cache="mycache"} 5.0

docs/content/instrumentation/guava.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ provided by Guava `Cache` objects into prometheus metrics.
99
{{< tabs "uniqueid" >}}
1010
{{< tab "Gradle" >}}
1111

12-
```
12+
```groovy
1313
implementation 'io.prometheus:prometheus-metrics-instrumentation-guava:1.3.2'
1414
```
1515

@@ -49,7 +49,7 @@ All example metrics on this page will use the `mycache` label value.
4949

5050
For all cache instances, the following metrics will be available:
5151

52-
```
52+
```text
5353
# TYPE guava_cache_hit counter
5454
# HELP guava_cache_hit Cache hit totals
5555
guava_cache_hit_total{cache="mycache"} 10.0
@@ -73,7 +73,7 @@ If the cache is an instance of `LoadingCache`, i.e. it is built with a `loader`
7373
managed by the cache library, then metrics for observing load time and load failures become
7474
available:
7575

76-
```
76+
```text
7777
# TYPE guava_cache_load_failure counter
7878
# HELP guava_cache_load_failure Cache load failures
7979
guava_cache_load_failure_total{cache="mycache"} 10.0

0 commit comments

Comments
 (0)