zentol commented on a change in pull request #7340: [FLINK-11174] [prometheus]
Flink Metrics Prometheus label values supp…
URL: https://github.com/apache/flink/pull/7340#discussion_r247072481
##########
File path:
flink-metrics/flink-metrics-prometheus/src/main/java/org/apache/flink/metrics/prometheus/PrometheusPushGatewayReporterOptions.java
##########
@@ -50,4 +50,11 @@
.key("deleteOnShutdown")
.defaultValue(true)
.withDescription("Specifies whether to delete metrics from the
PushGateway on shutdown.");
+
+ public static final ConfigOption<Boolean> FILTER_LABEL_VALUE_CHARACTER
= ConfigOptions
+ .key("filterLabelValueCharacters")
+ .defaultValue(true)
+ .withDescription("Specifies whether to filter label value
characters."
+ + " It's default to true, so only [a-zA-Z0-9:_] are
valid."
Review comment:
The default doesn't have to be referenced in the description.
Replace this call with:
```
.withDescription(Description.builder()
.text("Specifies whether to filter label value
characters." +
"If enabled, all characters not
matching [a-zA-Z0-9:_] will be removed," +
"otherwise no characters will be
removed." +
"Before disabling this option please
ensure that your" +
"label values meet the %s.",
LinkElement.link("https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels",
"Prometheus requirements"))
.build());
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services