You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "obelix74 (via GitHub)" <gi...@apache.org> on 2026/07/16 01:35:22 UTC
[PR] refactor(metrics): relocate Iceberg metrics write path to extensions with enveloped core SPI (PR0 of 3) [polaris]
obelix74 opened a new pull request, #5068:
URL: https://github.com/apache/polaris/pull/5068
## What / Why
Per the community sync (EJ, Dmitri, Anand), the Iceberg metrics work is being re-sliced into **three** PRs so the persistence-code-placement refactor is reviewable on its own, separate from the query feature:
- **PR0 (this PR)** — refactor the IRC metrics reporter SPI + relocate the write path.
- **PR1 — #4115** — Table Metrics query REST API.
- **PR2 — #4756** — JDBC implementation of the query SPI.
This PR contains **no query / read / REST code** — only the write-path reorganization.
## Changes
- Move the Iceberg metrics reporter SPI into `polaris-core` as `IcebergMetricsReporter`, taking a `MetricsReportEnvelope` (explicit `MetricType` + resolved table context + Iceberg report) instead of a raw `MetricsReport`.
- Relocate reporter implementations to extensions: `LoggingMetricsReporter` (default) and `NoOpMetricsReporter` in `extensions/metrics-reports/base`; `PersistingMetricsReporter`, `MetricsRecordConverter`, and a write-only `JdbcMetricsPersistence` in `extensions/metrics-reports/persistence/relational-jdbc`.
- Keep the neutral record types and the `MetricsPersistence` write SPI in `polaris-core`; move the JDBC model classes into the extension.
- Decouple metrics from core persistence: drop the `MetricsPersistence` implementation from `JdbcBasePersistenceImpl` and remove `getOrCreateMetricsPersistence` from `MetaStoreManagerFactory` and its implementations. The extension's `JdbcMetricsPersistence` is now the sole `MetricsPersistence` CDI bean.
- Reporter selection stays in `runtime/service` (default type `default` = logging); the envelope is built at the `IcebergCatalogHandler` call site.
## Testing
- `./gradlew build` and `:polaris-runtime-service:intTest` (Quarkus) pass.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(metrics): relocate Iceberg metrics write path to extensions with enveloped core SPI (PR0 of 3) [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on PR #5068:
URL: https://github.com/apache/polaris/pull/5068#issuecomment-4995039835
@obelix74 : sure, but CI failed again :sweat_smile:
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(metrics): relocate Iceberg metrics write path to extensions with enveloped core SPI (PR0 of 3) [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on PR #5068:
URL: https://github.com/apache/polaris/pull/5068#issuecomment-5026358580
@flyingImer : Any concerns from your side? If not I propose to merge on Jul 21. Follow-up changes are always welcome even if we miss something in this PR :sweat_smile:
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(metrics): relocate Iceberg metrics write path to extensions with enveloped core SPI (PR0 of 3) [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #5068:
URL: https://github.com/apache/polaris/pull/5068#discussion_r3592128760
##########
polaris-core/src/main/java/org/apache/polaris/core/metrics/IcebergMetricsReporter.java:
##########
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.polaris.core.metrics;
+
+import com.google.common.annotations.Beta;
+import org.jspecify.annotations.NonNull;
+
+/**
+ * SPI for reporting Iceberg metrics received by Polaris.
+ *
+ * <p>Implementations receive a {@link MetricsReportEnvelope} carrying the resolved table context,
+ * the Iceberg metrics report, and an explicit {@link MetricType}. They can send the metrics to
+ * external systems, log them, or persist them.
+ *
+ * <p>Custom implementations should be annotated with the appropriate CDI scope and
+ * {@code @Identifier("my-type")} for selection via the {@code
+ * polaris.iceberg-metrics.reporting.type} configuration property, which defaults to {@code
+ * "default"}.
+ *
+ * <p>This interface is intentionally runtime/framework-agnostic. CDI and configuration concerns
+ * belong in the implementing class, not here.
+ */
+@Beta
+public interface IcebergMetricsReporter {
Review Comment:
Now that metrics have been detached from `BasePersistence`, I do not see any use cases for this interface in `polaris-core`. Only the REST API service code needs it, but that code is located in `runtime/service`.
I believe moving it to `runtime/service` might be a good idea (together with `MetricsReportEnvelope` and `MetricsType`, of course).
* It keeps core free from extraneous code.
* Implementations of this interface can only work in conjunction with `runtime/service` anyway, so adding that dependency does not cause a "dependency leak".
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(metrics): relocate Iceberg metrics write path to extensions with enveloped core SPI (PR0 of 3) [polaris]
Posted by "obelix74 (via GitHub)" <gi...@apache.org>.
obelix74 commented on PR #5068:
URL: https://github.com/apache/polaris/pull/5068#issuecomment-4987191537
@dimas-b and @flyingImer - this is PR0.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(metrics): relocate Iceberg metrics write path to extensions with enveloped core SPI (PR0 of 3) [polaris]
Posted by "flyingImer (via GitHub)" <gi...@apache.org>.
flyingImer commented on code in PR #5068:
URL: https://github.com/apache/polaris/pull/5068#discussion_r3676236578
##########
runtime/service/src/main/java/org/apache/polaris/service/metrics/IcebergMetricsReporter.java:
##########
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.polaris.core.metrics;
+
+import com.google.common.annotations.Beta;
+import org.jspecify.annotations.NonNull;
+
+/**
+ * SPI for reporting Iceberg metrics received by Polaris.
+ *
+ * <p>Implementations receive a {@link MetricsReportEnvelope} carrying the resolved table context,
+ * the Iceberg metrics report, and an explicit {@link MetricType}. They can send the metrics to
+ * external systems, log them, or persist them.
+ *
+ * <p>Custom implementations should be annotated with the appropriate CDI scope and
+ * {@code @Identifier("my-type")} for selection via the {@code
+ * polaris.iceberg-metrics.reporting.type} configuration property, which defaults to {@code
+ * "default"}.
+ *
+ * <p>This interface is intentionally runtime/framework-agnostic. CDI and configuration concerns
+ * belong in the implementing class, not here.
+ */
+@Beta
+public interface IcebergMetricsReporter {
Review Comment:
@dimas-b I want to push back on the runtime/service move specifically.
I don't think "only the REST service code needs it today" is the right test for where a contract lives. The real question: is this a runtime-agnostic contract, portable enough that someone could call it from outside Quarkus entirely like a Lambda, a Spring app, whatever they're running Polaris logic inside, without dragging in anything Quarkus-specific to do it?
**semantic check:** Callback to the platform-flexibility bar (the north star) you raised in previous metrics sync, I interpret it as: Polaris being a platform should have the flexibility to support different backends per concern, not force every consumer through one runtime module. And it's the exact boundary rule from the SPI mental-model preview a few syncs later: provider impls should compile against public contracts only, never against runtime/service wiring. This SPI is a contract a provider implements. By that rule it belongs where contracts live, not where wiring lives. I am fully aware that our current situation is far from this desired shape, I'm collecting a short list.
**syntactic check:** Look at the interface itself: zero CDI, zero JAX-RS, nothing Quarkus about it. Nothing in the TYPE stops it from being portable. Only the module we put it in does that. Pinning it to runtime/service doesn't describe a fact about the contract, IMO it introduces undesired dependency challenges.
On your second bullet, that implementations can only work in conjunction with runtime/service anyway so it's not a dependency leak: I agree with the rule. But I see it as out of the box Polaris experience has a hard dependency on runtime framework we choose here, but not the contract. A contract **can** live in the module every implementation modules dependable, which is core/.
Current placement put SPI in runtime/, which requires alternative impls to depend on runtime/ module rather than core/ module. It creates a weird dependency of extensions/ -> runtime/ -> core/ and extensions/, which should have been runtime/ -> extensions/ and core/. I think extensions/ module can be framework aware, but not in a way directly depend on runtime/ but depending on framework modules as runtime/ would do IMHO.
If "keeps core free of extraneous code" is the real worry, I'm fine with extensions/ instead of core/ for now, I think we briefly discussed this placement model early on. I'm still working out how I want to mental-model where a contract like this settles long-term, happy to leave that open. Just not runtime/service, that's the one placement that doesn't hold up IMO.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(metrics): relocate Iceberg metrics write path to extensions with enveloped core SPI (PR0 of 3) [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b merged PR #5068:
URL: https://github.com/apache/polaris/pull/5068
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(metrics): relocate Iceberg metrics write path to extensions with enveloped core SPI (PR0 of 3) [polaris]
Posted by "obelix74 (via GitHub)" <gi...@apache.org>.
obelix74 commented on PR #5068:
URL: https://github.com/apache/polaris/pull/5068#issuecomment-4995503221
> @obelix74 : sure, but CI failed again 😅
Took a while, but it is fixed now.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(metrics): relocate Iceberg metrics write path to extensions with enveloped core SPI (PR0 of 3) [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on PR #5068:
URL: https://github.com/apache/polaris/pull/5068#issuecomment-5036794970
I believe this PR matches the refactoring direction as discussed on `dev`.
https://lists.apache.org/thread/0jz0zd6q2hn9drfpx6w1mzj9sv309q8r
I'm merging it in current state. Further refactoring / improvement proposals are welcome, of course.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(metrics): relocate Iceberg metrics write path to extensions with enveloped core SPI (PR0 of 3) [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #5068:
URL: https://github.com/apache/polaris/pull/5068#discussion_r3724943878
##########
runtime/service/src/main/java/org/apache/polaris/service/metrics/IcebergMetricsReporter.java:
##########
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.polaris.core.metrics;
+
+import com.google.common.annotations.Beta;
+import org.jspecify.annotations.NonNull;
+
+/**
+ * SPI for reporting Iceberg metrics received by Polaris.
+ *
+ * <p>Implementations receive a {@link MetricsReportEnvelope} carrying the resolved table context,
+ * the Iceberg metrics report, and an explicit {@link MetricType}. They can send the metrics to
+ * external systems, log them, or persist them.
+ *
+ * <p>Custom implementations should be annotated with the appropriate CDI scope and
+ * {@code @Identifier("my-type")} for selection via the {@code
+ * polaris.iceberg-metrics.reporting.type} configuration property, which defaults to {@code
+ * "default"}.
+ *
+ * <p>This interface is intentionally runtime/framework-agnostic. CDI and configuration concerns
+ * belong in the implementing class, not here.
+ */
+@Beta
+public interface IcebergMetricsReporter {
Review Comment:
I guess #5204 is the continuation of this discussion, right?
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(metrics): relocate Iceberg metrics write path to extensions with enveloped core SPI (PR0 of 3) [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on PR #5068:
URL: https://github.com/apache/polaris/pull/5068#issuecomment-4992967037
@obelix74 : Unfortunately, it looks like tests like `PolarisRestCatalogMinIOIT > testSendMetricsReport()` fail now :shrug: :thinking:
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(metrics): relocate Iceberg metrics write path to extensions with enveloped core SPI (PR0 of 3) [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #5068:
URL: https://github.com/apache/polaris/pull/5068#discussion_r3592175099
##########
runtime/service/src/main/java/org/apache/polaris/service/config/ServiceProducers.java:
##########
@@ -451,9 +443,19 @@ 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) {
+ Instance<IcebergMetricsReporter> selected =
+ reporters.select(Identifier.Literal.of(config.type()));
+ if (selected.isResolvable()) {
+ return selected.get();
+ }
+ // Reporter implementations live in the polaris-extensions-metrics-reports(-jdbc) modules; when
+ // none matches the configured type, drop metrics rather than failing core service startup.
+ LOGGER.warn(
+ "No IcebergMetricsReporter found for type '{}'; Iceberg metrics will be dropped",
+ config.type());
+ return envelope -> {};
Review Comment:
I'm not sure a WARN log is justified here. `IcebergMetricsReporter` is a required parameter for `IcebergCatalogHandler`, but if a particular downstream build chooses not to bundle a metrics reporter, this warning will be a false alarm.
It might be best to return an implementation that fails (and logs) if `reportMetric()` is actually invoked.
##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/LocalPolarisMetaStoreManagerFactory.java:
##########
@@ -160,11 +159,6 @@ public synchronized TransactionalPersistence getOrCreateSession(RealmContext rea
return sessionSupplierMap.get(realmContext.getRealmIdentifier()).get();
}
- @Override
- public MetricsPersistence getOrCreateMetricsPersistence(RealmContext realmContext) {
Review Comment:
nice cleanup 👍
##########
polaris-core/src/main/java/org/apache/polaris/core/metrics/IcebergMetricsReporter.java:
##########
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.polaris.core.metrics;
+
+import com.google.common.annotations.Beta;
+import org.jspecify.annotations.NonNull;
+
+/**
+ * SPI for reporting Iceberg metrics received by Polaris.
+ *
+ * <p>Implementations receive a {@link MetricsReportEnvelope} carrying the resolved table context,
+ * the Iceberg metrics report, and an explicit {@link MetricType}. They can send the metrics to
+ * external systems, log them, or persist them.
+ *
+ * <p>Custom implementations should be annotated with the appropriate CDI scope and
+ * {@code @Identifier("my-type")} for selection via the {@code
+ * polaris.iceberg-metrics.reporting.type} configuration property, which defaults to {@code
+ * "default"}.
+ *
+ * <p>This interface is intentionally runtime/framework-agnostic. CDI and configuration concerns
+ * belong in the implementing class, not here.
+ */
+@Beta
+public interface IcebergMetricsReporter {
Review Comment:
Now that metrics have been detached from `BasePersistence`, I do not see any use cases for this interface in `polaris-core`. Only the REST API service code needs it, but that code is located in `runtime/service`.
I believe moving it `runtime/service` might be a good idea (together with `MetricsReportEnvelope` and `MetricsType`, of course).
* It keeps core free from extraneous code.
* Implementations of this interface can only work in conjunction with `runtime/service` anyway, so adding that dependency does not cause a "dependency leak".
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(metrics): relocate Iceberg metrics write path to extensions with enveloped core SPI (PR0 of 3) [polaris]
Posted by "obelix74 (via GitHub)" <gi...@apache.org>.
obelix74 commented on code in PR #5068:
URL: https://github.com/apache/polaris/pull/5068#discussion_r3592859097
##########
runtime/service/src/main/java/org/apache/polaris/service/metrics/IcebergMetricsReporter.java:
##########
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.polaris.core.metrics;
+
+import com.google.common.annotations.Beta;
+import org.jspecify.annotations.NonNull;
+
+/**
+ * SPI for reporting Iceberg metrics received by Polaris.
+ *
+ * <p>Implementations receive a {@link MetricsReportEnvelope} carrying the resolved table context,
+ * the Iceberg metrics report, and an explicit {@link MetricType}. They can send the metrics to
+ * external systems, log them, or persist them.
+ *
+ * <p>Custom implementations should be annotated with the appropriate CDI scope and
+ * {@code @Identifier("my-type")} for selection via the {@code
+ * polaris.iceberg-metrics.reporting.type} configuration property, which defaults to {@code
+ * "default"}.
+ *
+ * <p>This interface is intentionally runtime/framework-agnostic. CDI and configuration concerns
+ * belong in the implementing class, not here.
+ */
+@Beta
+public interface IcebergMetricsReporter {
Review Comment:
Done — moved `IcebergMetricsReporter`, `MetricsReportEnvelope` and `MetricType` to `runtime/service` (`org.apache.polaris.service.metrics`); `polaris-core` no longer carries them. The base and JDBC reporter extensions now depend on `polaris-runtime-service`, matching the existing pattern in `extensions/semantic-models`. Thanks for the suggestion.
##########
runtime/service/src/main/java/org/apache/polaris/service/config/ServiceProducers.java:
##########
@@ -451,9 +443,19 @@ 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) {
+ Instance<IcebergMetricsReporter> selected =
+ reporters.select(Identifier.Literal.of(config.type()));
+ if (selected.isResolvable()) {
+ return selected.get();
+ }
+ // Reporter implementations live in the polaris-extensions-metrics-reports(-jdbc) modules; when
+ // none matches the configured type, drop metrics rather than failing core service startup.
+ LOGGER.warn(
+ "No IcebergMetricsReporter found for type '{}'; Iceberg metrics will be dropped",
+ config.type());
+ return envelope -> {};
Review Comment:
Good point — removed the startup WARN. The producer now returns a reporter that logs an error and throws `IllegalStateException` only if `reportMetric()` is actually invoked, so a downstream build that intentionally omits a metrics reporter won't get a false alarm at startup.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(metrics): relocate Iceberg metrics write path to extensions with enveloped core SPI (PR0 of 3) [polaris]
Posted by "obelix74 (via GitHub)" <gi...@apache.org>.
obelix74 commented on PR #5068:
URL: https://github.com/apache/polaris/pull/5068#issuecomment-4994963352
Thanks @dimas-b, I will be offline starting tomorrow for 9 days. Merge at will.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org