mlbiscoc commented on code in PR #5247:
URL: https://github.com/apache/solr/pull/5247#discussion_r4405871786
##########
solr/core/src/test/org/apache/solr/metrics/SolrMetricManagerTest.java:
##########
@@ -293,6 +296,38 @@ public void testMetricExporter() throws Exception {
});
}
+ /**
+ * SOLR-18595: with an exporter registered, each registry gets its own
PeriodicMetricReader, and
+ * every reader reports the SDK's self-telemetry under the same component
id. Merging the
+ * registries the way the metrics endpoint does then saw duplicate label
sets and threw.
+ */
+ @Test
+ public void testExporterSelfTelemetryDoesNotBreakMergedSnapshots() {
Review Comment:
I know we are testing a specific regression here but it was more that a
regression was found because there was a testing gap of not testing the metrics
endpoint with OTLP. I personally think itd be better to just test the endpoint
with OTLP on and that there is no 500 response in `MetricsHandlerTest.java`.
Test can be called `testMetricsWithOtlpExporterEnabled`. It should catch the
same thing.
##########
solr/core/src/test/org/apache/solr/metrics/SolrMetricManagerTest.java:
##########
@@ -293,6 +296,38 @@ public void testMetricExporter() throws Exception {
});
}
+ /**
+ * SOLR-18595: with an exporter registered, each registry gets its own
PeriodicMetricReader, and
+ * every reader reports the SDK's self-telemetry under the same component
id. Merging the
+ * registries the way the metrics endpoint does then saw duplicate label
sets and threw.
+ */
Review Comment:
I don't think we need this comment. The test I feel is enough to just test a
gap that was missing.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]