Skip to content

Commit 26558d1

Browse files
committed
lint
Signed-off-by: Gregor Zeitlinger <[email protected]>
1 parent 3892f74 commit 26558d1

File tree

13 files changed

+62
-33
lines changed

13 files changed

+62
-33
lines changed

docs/content/_index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
title: "client_java"
33
---
44

5-
This is the documentation for the
6-
[Prometheus Java client library](https://github.com/prometheus/client_java)
5+
This is the documentation for the
6+
[Prometheus Java client library](https://github.com/prometheus/client_java)
77
version 1.0.0 and higher.
88

99
The main new features of the 1.0.0 release are:
@@ -43,11 +43,11 @@ Updating to the 1.0.0 version is a breaking change. However, there's a
4343
`prometheus-metrics-simpleclient-bridge` module available that allows you to use your existing
4444
simpleclient 0.16.0 metrics with the new 1.0.0 `PrometheusRegistry`.
4545
So you don't need to upgrade your instrumentation code, you can keep using your existing metrics.
46-
See the
47-
[compatibility > simpleclient](https://prometheus.github.io/client_java/migration/simpleclient/)
46+
See the
47+
[compatibility > simpleclient](https://prometheus.github.io/client_java/migration/simpleclient/)
4848
in the menu on the left.
4949

50-
The pre 1.0.0 code is now maintained on the
50+
The pre 1.0.0 code is now maintained on the
5151
[simpleclient](https://github.com/prometheus/client_java/tree/simpleclient) feature branch.
5252

5353
Not all `simpleclient` modules from 0.16.0 are included in the initial 1.0.0 release.

docs/content/config/config.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ The properties file is searched in the following locations:
3737
## Metrics Properties
3838

3939
<!-- editorconfig-checker-disable -->
40+
4041
| Name | Javadoc | Note |
4142
| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
4243
| io.prometheus.metrics.exemplarsEnabled | [Counter.Builder.withExemplars()](</client_java/api/io/prometheus/metrics/core/metrics/Counter.Builder.html#withExemplars()>) | (1) (2) |
@@ -52,6 +53,7 @@ The properties file is searched in the following locations:
5253
| io.prometheus.metrics.summaryQuantileErrors | [Summary.Builder.quantile(double, double)](</client_java/api/io/prometheus/metrics/core/metrics/Summary.Builder.html#quantile(double,double)>) | (5) |
5354
| io.prometheus.metrics.summaryMaxAgeSeconds | [Summary.Builder.maxAgeSeconds()](</client_java/api/io/prometheus/metrics/core/metrics/Summary.Builder.html#maxAgeSeconds(long)>) | |
5455
| io.prometheus.metrics.summaryNumberOfAgeBuckets | [Summary.Builder.numberOfAgeBuckets()](</client_java/api/io/prometheus/metrics/core/metrics/Summary.Builder.html#numberOfAgeBuckets(int)>) | |
56+
5557
<!-- editorconfig-checker-enable -->
5658

5759
**Notes**
@@ -85,34 +87,40 @@ This works for all Metrics properties.
8587
## Exemplar Properties
8688

8789
<!-- editorconfig-checker-disable -->
90+
8891
| Name | Javadoc | Note |
8992
| -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
9093
| io.prometheus.exemplars.minRetentionPeriodSeconds | [ExemplarsProperties.getMinRetentionPeriodSeconds()](</client_java/api/io/prometheus/metrics/config/ExemplarsProperties.html#getMinRetentionPeriodSeconds()>) | |
9194
| io.prometheus.exemplars.maxRetentionPeriodSeconds | [ExemplarsProperties.getMaxRetentionPeriodSeconds()](</client_java/api/io/prometheus/metrics/config/ExemplarsProperties.html#getMaxRetentionPeriodSeconds()>) | |
9295
| io.prometheus.exemplars.sampleIntervalMilliseconds | [ExemplarsProperties.getSampleIntervalMilliseconds()](</client_java/api/io/prometheus/metrics/config/ExemplarsProperties.html#getSampleIntervalMilliseconds()>) | |
93-
<!-- editorconfig-checker-enable -->
96+
97+
<!-- editorconfig-checker-enable -->
9498

9599
## Exporter Properties
96100

97101
<!-- editorconfig-checker-disable -->
102+
98103
| Name | Javadoc | Note |
99104
| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
100105
| io.prometheus.exporter.includeCreatedTimestamps | [ExporterProperties.getIncludeCreatedTimestamps()](</client_java/api/io/prometheus/metrics/config/ExporterProperties.html#getIncludeCreatedTimestamps()>) | (1) |
101106
| io.prometheus.exporter.exemplarsOnAllMetricTypes | [ExporterProperties.getExemplarsOnAllMetricTypes()](</client_java/api/io/prometheus/metrics/config/ExporterProperties.html#getExemplarsOnAllMetricTypes()>) | (1) |
102-
<!-- editorconfig-checker-enable -->
107+
108+
<!-- editorconfig-checker-enable -->
103109

104110
(1) Boolean value, `true` or `false`. Default see Javadoc.
105111

106112
## Exporter Filter Properties
107113

108114
<!-- editorconfig-checker-disable -->
115+
109116
| Name | Javadoc | Note |
110117
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
111118
| io.prometheus.exporter.filter.metricNameMustBeEqualTo | [ExporterFilterProperties.getAllowedMetricNames()](</client_java/api/io/prometheus/metrics/config/ExporterFilterProperties.html#getAllowedMetricNames()>) | (1) |
112119
| io.prometheus.exporter.filter.metricNameMustNotBeEqualTo | [ExporterFilterProperties.getExcludedMetricNames()](</client_java/api/io/prometheus/metrics/config/ExporterFilterProperties.html#getExcludedMetricNames()>) | (2) |
113120
| io.prometheus.exporter.filter.metricNameMustStartWith | [ExporterFilterProperties.getAllowedMetricNamePrefixes()](</client_java/api/io/prometheus/metrics/config/ExporterFilterProperties.html#getAllowedMetricNamePrefixes()>) | (3) |
114121
| io.prometheus.exporter.filter.metricNameMustNotStartWith | [ExporterFilterProperties.getExcludedMetricNamePrefixes()](</client_java/api/io/prometheus/metrics/config/ExporterFilterProperties.html#getExcludedMetricNamePrefixes()>) | (4) |
115-
<!-- editorconfig-checker-enable -->
122+
123+
<!-- editorconfig-checker-enable -->
116124

117125
(1) Comma sparated list of allowed metric names. Only these metrics will be exposed.<br/>
118126
(2) Comma sparated list of excluded metric names. These metrics will not be exposed.<br/>
@@ -122,14 +130,17 @@ This works for all Metrics properties.
122130
## Exporter HTTPServer Properties
123131

124132
<!-- editorconfig-checker-disable -->
133+
125134
| Name | Javadoc | Note |
126135
| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | ---- |
127136
| io.prometheus.exporter.httpServer.port | [HTTPServer.Builder.port()](</client_java/api/io/prometheus/metrics/exporter/httpserver/HTTPServer.Builder.html#port(int)>) | |
128-
<!-- editorconfig-checker-enable -->
137+
138+
<!-- editorconfig-checker-enable -->
129139

130140
## Exporter OpenTelemetry Properties
131141

132142
<!-- editorconfig-checker-disable -->
143+
133144
| Name | Javadoc | Note |
134145
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
135146
| io.prometheus.exporter.opentelemetry.protocol | [OpenTelemetryExporter.Builder.protocol()](</client_java/api/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.Builder.html#protocol(java.lang.String)>) | (1) |
@@ -142,7 +153,8 @@ This works for all Metrics properties.
142153
| io.prometheus.exporter.opentelemetry.serviceInstanceId | [OpenTelemetryExporter.Builder.serviceInstanceId()](</client_java/api/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.Builder.html#serviceInstanceId(java.lang.String)>) | |
143154
| io.prometheus.exporter.opentelemetry.serviceVersion | [OpenTelemetryExporter.Builder.serviceVersion()](</client_java/api/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.Builder.html#serviceVersion(java.lang.String)>) | |
144155
| io.prometheus.exporter.opentelemetry.resourceAttributes | [OpenTelemetryExporter.Builder.resourceAttributes()](</client_java/api/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.Builder.html#resourceAttribute(java.lang.String,java.lang.String)>) | (3) |
145-
<!-- editorconfig-checker-enable -->
156+
157+
<!-- editorconfig-checker-enable -->
146158

147159
(1) Protocol can be `grpc` or `http/protobuf`.<br>
148160
(2) Format: `key1=value1,key2=value2`<br>
@@ -156,9 +168,11 @@ See Javadoc for details.
156168
## Exporter PushGateway Properties
157169

158170
<!-- editorconfig-checker-disable -->
171+
159172
| Name | Javadoc | Note |
160173
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
161174
| io.prometheus.exporter.pushgateway.address | [PushGateway.Builder.address()](</client_java/api/io/prometheus/metrics/exporter/pushgateway/PushGateway.Builder.html#address(java.lang.String)>) | |
162175
| io.prometheus.exporter.pushgateway.scheme | [PushGateway.Builder.scheme()](</client_java/api/io/prometheus/metrics/exporter/pushgateway/PushGateway.Builder.html#scheme(java.lang.String)>) | |
163176
| io.prometheus.exporter.pushgateway.job | [PushGateway.Builder.job()](</client_java/api/io/prometheus/metrics/exporter/pushgateway/PushGateway.Builder.html#job(java.lang.String)>) | |
164-
<!-- editorconfig-checker-enable -->
177+
178+
<!-- editorconfig-checker-enable -->

docs/content/exporters/formats.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ quick debugging of the other formats, exporters provide a `debug` URL parameter:
2525

2626
- `/metrics?debug=openmetrics`: View OpenMetrics text format.
2727
- `/metrics?debug=text`: View Prometheus text format.
28-
- `/metrics?debug=prometheus-protobuf`: View a text representation of the Prometheus protobuf
28+
- `/metrics?debug=prometheus-protobuf`: View a text representation of the Prometheus protobuf
2929
format.
3030

3131
## Exclude protobuf exposition format

docs/content/exporters/httpserver.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ with [defaultHandler()](</client_java/api/io/prometheus/metrics/exporter/httpser
3333
- [httpsConfigurator()](</client_java/api/io/prometheus/metrics/exporter/httpserver/HTTPServer.Builder.html#httpsConfigurator(com.sun.net.httpserver.HttpsConfigurator)>) <!-- editorconfig-checker-disable-line -->
3434
is for configuring HTTPS.
3535

36-
You can find an example of authentication and SSL in the
37-
[jmx_exporter](https://github.com/prometheus/jmx_exporter).
36+
You can find an example of authentication and SSL in the
37+
[jmx_exporter](https://github.com/prometheus/jmx_exporter).
3838

3939
## Properties
4040

docs/content/exporters/pushgateway.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public class ExampleBatchJob {
7474

7575
## Basic Auth
7676

77-
The [PushGateway](/client_java/api/io/prometheus/metrics/exporter/pushgateway/PushGateway.html)
77+
The [PushGateway](/client_java/api/io/prometheus/metrics/exporter/pushgateway/PushGateway.html)
7878
supports basic authentication.
7979

8080
```java
@@ -88,7 +88,7 @@ The `PushGatewayTestApp` in `integration-tests/it-pushgateway` has a complete ex
8888

8989
## Bearer token
9090

91-
The [PushGateway](/client_java/api/io/prometheus/metrics/exporter/pushgateway/PushGateway.html)
91+
The [PushGateway](/client_java/api/io/prometheus/metrics/exporter/pushgateway/PushGateway.html)
9292
supports Bearer token authentication.
9393

9494
```java
@@ -102,7 +102,7 @@ The `PushGatewayTestApp` in `integration-tests/it-pushgateway` has a complete ex
102102

103103
## SSL
104104

105-
The [PushGateway](/client_java/api/io/prometheus/metrics/exporter/pushgateway/PushGateway.html)
105+
The [PushGateway](/client_java/api/io/prometheus/metrics/exporter/pushgateway/PushGateway.html)
106106
supports SSL.
107107

108108
```java

docs/content/exporters/servlet.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ is a [Jakarta Servlet](https://jakarta.ee/specifications/servlet/) for exposing
1212
The old-school way of configuring a servlet is in a `web.xml` file:
1313

1414
<!-- editorconfig-checker-disable -->
15+
1516
```xml
1617
<?xml version="1.0" encoding="UTF-8"?>
1718
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
@@ -28,7 +29,8 @@ The old-school way of configuring a servlet is in a `web.xml` file:
2829
</servlet-mapping>
2930
</web-app>
3031
```
31-
<!-- editorconfig-checker-enable -->
32+
33+
<!-- editorconfig-checker-enable -->
3234

3335
## Programmatic
3436

docs/content/getting-started/callbacks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Callbacks
33
weight: 5
44
---
55

6-
The section on [metric types]({{< relref "metric-types.md" >}})
6+
The section on [metric types]({{< relref "metric-types.md" >}})
77
showed how to use metrics that actively maintain their state.
88

99
This section shows how to create callback-based metrics, i.e. metrics that invoke a callback

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ the Prometheus server.
8484
format and ingest both, the classic and the native flavor. This is great for migrating from
8585
classic histograms to native histograms.
8686

87-
See [examples/example-native-histogram](https://github.com/prometheus/client_java/tree/1.0.x/examples/example-native-histogram) <!-- editorconfig-checker-disable-line -->
87+
See [examples/example-native-histogram](https://github.com/prometheus/client_java/tree/1.0.x/examples/example-native-histogram) <!-- editorconfig-checker-disable-line -->
8888
for an example.
8989

9090
```java
@@ -112,8 +112,7 @@ most important options:
112112
- `classicBuckets(...)`: Set the classic bucket boundaries. Default buckets are `.005`, `.01`,
113113
`.025`, `.05`, `.1`, `.25`, `.5`, `1`, `2.5`, `5`, `and 10`. The default bucket boundaries are
114114
designed for measuring request durations in seconds.
115-
- `nativeMaxNumberOfBuckets()`: Upper limit for the number of native histogram buckets. Default is
116-
160. When the maximum is reached, the native histogram automatically reduces resolution to stay
115+
- `nativeMaxNumberOfBuckets()`: Upper limit for the number of native histogram buckets. Default is 160. When the maximum is reached, the native histogram automatically reduces resolution to stay
117116
below the limit.
118117

119118
See Javadoc
@@ -227,12 +226,14 @@ info.setLabelValues(version, vendor, runtime);
227226
The info above looks as follows in OpenMetrics text format:
228227

229228
<!-- editorconfig-checker-disable -->
229+
230230
```text
231231
# TYPE jvm_runtime info
232232
# HELP jvm_runtime JVM runtime info
233233
jvm_runtime_info{runtime="OpenJDK Runtime Environment",vendor="Oracle Corporation",version="1.8.0_382-b05"} 1
234234
```
235-
<!-- editorconfig-checker-enable -->
235+
236+
<!-- editorconfig-checker-enable -->
236237

237238
The example is taken from the `prometheus-metrics-instrumentation-jvm` module, so if you have
238239
`JvmMetrics` registered you should have a `jvm_runtime_info` metric out-of-the-box.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ method in ExtendedMultiCollector
1212
see SampleExtendedMultiCollector in io.prometheus.metrics.examples.httpserver
1313

1414
<!-- editorconfig-checker-disable -->
15+
1516
```java
1617
public class SampleExtendedMultiCollector extends ExtendedMultiCollector {
1718

@@ -78,8 +79,8 @@ public class SampleExtendedMultiCollector extends ExtendedMultiCollector {
7879
}
7980

8081
```
81-
<!-- editorconfig-checker-enable -->
8282

83+
<!-- editorconfig-checker-enable -->
8384

8485
`PrometheusScrapeRequest` provides methods to access http-related infos from the request originally
8586
received by the endpoint

docs/content/getting-started/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public class App {
175175
.port(9400)
176176
.buildAndStart();
177177

178-
System.out.println("HTTPServer listening on port http://localhost:" +
178+
System.out.println("HTTPServer listening on port http://localhost:" +
179179
server.getPort() + "/metrics");
180180

181181
Thread.currentThread().join(); // sleep forever

0 commit comments

Comments
 (0)