obelix74 commented on code in PR #4115:
URL: https://github.com/apache/polaris/pull/4115#discussion_r3424610894
##########
extensions/metrics-reports/spi/src/main/java/org/apache/polaris/core/metrics/IcebergMetricsReporter.java:
##########
@@ -16,38 +16,33 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.polaris.service.reporting;
+package org.apache.polaris.core.metrics;
Review Comment:
Done — renamed the package to `org.apache.polaris.extension.metrics`
(matching the `extensions/metrics-reports/spi` module) and moved the file
accordingly. All importers updated (catalog handler, service producers, impl
reporters, CHANGELOG). Pushed in cc33a7fc2.
##########
runtime/service/src/main/java/org/apache/polaris/service/config/ServiceProducers.java:
##########
@@ -457,9 +457,16 @@ public RequestIdSupplier requestIdSupplier() {
@Produces
@ApplicationScoped
- public PolarisMetricsReporter metricsReporter(
- MetricsReportingConfiguration config, @Any
Instance<PolarisMetricsReporter> reporters) {
- return reporters.select(Identifier.Literal.of(config.type())).get();
+ public IcebergMetricsReporter metricsReporter(
+ MetricsReportingConfiguration config, @Any
Instance<IcebergMetricsReporter> reporters) {
+ var selected = reporters.select(Identifier.Literal.of(config.type()));
+ if (selected.isUnsatisfied()) {
+ LOGGER.warn(
+ "No IcebergMetricsReporter found for type '{}'; Iceberg metrics will
be dropped",
+ config.type());
+ return (catalogName, catalogId, table, tableId, metricsReport,
receivedTimestamp) -> {};
Review Comment:
Correct — `NoOpMetricsReporter` (and `LoggingMetricsReporter`) now live in
`extensions/metrics-reports/impl`, not the SPI. Restored the `isUnsatisfied()`
fallback in `ServiceProducers.metricsReporter()` with a comment explaining why:
if the impl module isn't on the classpath (minimal deployment), CDI won't find
any reporter and the inline no-op lambda prevents a hard failure at startup.
Pushed in cc33a7fc2.
--
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]