jt2594838 commented on code in PR #18562:
URL: https://github.com/apache/iotdb/pull/18562#discussion_r3910431655
##########
iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/reporter/prometheus/PrometheusReporter.java:
##########
@@ -104,8 +127,12 @@ public boolean start() {
// authenticate not pass
return Mono.empty();
}
+ String metrics =
+ METRIC_CONFIG.isPrometheusReporterAsyncUpdate()
+ ? getMetricsSnapshot()
Review Comment:
The cache now uses a null value as an explicit uninitialized state, and this
request path synchronously scrapes on the first request. This closes the
startup window where AbstractMetricService has started the reporter but has not
yet bound metric sets, which previously returned HTTP 200 with an empty body.
The fallback is covered by IoTDBMetricIT.testPrometheusReporterWithoutAuth.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]