Tom-Goong commented on a change in pull request #7820:
[FLINK-11742][Metrics]Push metrics to Pushgateway without "instance"
URL: https://github.com/apache/flink/pull/7820#discussion_r261851648
##########
File path:
flink-metrics/flink-metrics-prometheus/src/main/java/org/apache/flink/metrics/prometheus/PrometheusPushGatewayReporter.java
##########
@@ -73,7 +77,7 @@ public void open(MetricConfig config) {
@Override
public void report() {
try {
- pushGateway.push(CollectorRegistry.defaultRegistry,
jobName);
+ pushGateway.push(CollectorRegistry.defaultRegistry,
jobName, instance);
Review comment:
In fact, using a random string is also a compromise. However, if you only
use **jobName** as the instance, putgateway will merge into one according to
the **metric name and instance**, and the data will be lost. Just like the
picture I wrote in JIRA (https://issues.apache.org/jira/browse/FLINK-11742 ).
Now I adjust the instance to a splicing of jobName and random strings, which
can reduce confusion.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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