Skip to content

GCP: Add CloudMonitoringMetricsReporter to export Iceberg metrics to Cloud Monitoring#16107

Open
talatuyarer wants to merge 1 commit into
apache:mainfrom
talatuyarer:gcp-cloud-monitoring
Open

GCP: Add CloudMonitoringMetricsReporter to export Iceberg metrics to Cloud Monitoring#16107
talatuyarer wants to merge 1 commit into
apache:mainfrom
talatuyarer:gcp-cloud-monitoring

Conversation

@talatuyarer
Copy link
Copy Markdown
Contributor

This PR adds a new MetricsReporter implementation to the iceberg-gcp module that sends Iceberg scan and commit metrics to Google Cloud Monitoring.

@talatuyarer talatuyarer force-pushed the gcp-cloud-monitoring branch 4 times, most recently from 60316ce to fc34a15 Compare April 25, 2026 00:25
@stevenzwu stevenzwu changed the title Add CloudMonitoringMetricsReporter to export Iceberg metrics to Cloud Monitoring GCP: Add CloudMonitoringMetricsReporter to export Iceberg metrics to Cloud Monitoring Apr 30, 2026
Comment thread gcp-bundle/build.gradle
implementation "com.google.cloud:google-cloud-bigquery"
implementation "com.google.cloud:google-cloud-core"
implementation "com.google.cloud:google-cloud-kms"
implementation "com.google.cloud:google-cloud-monitoring"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should be very careful with dependency change for runtime bundle jar. was this PR created after all the dependency/license fixes. at least, rebase with the latest main branch. CI should catch dependency/license problems nowadays.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I created this PR Last Friday. How can I verify that ? There is also license check too

https://github.com/apache/iceberg/actions/runs/25008117162/job/73236359466?pr=16107

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 #16103 + #16081 should enforce any runtime dep changes in CI, via [check-runtime-deps](https://github.com/apache/iceberg/actions/runs/25399058172/job/74493503774?pr=16107#logs) task

Theres also #16182 which is updating the LICENSE for GCP bundle.

Lets wait for all 3 PRs to land so we have a good baseline, and then we can look at adding new deps

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would expect the runtime-deps.txt file to be modifed based on this addition...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see the GitHub action for licensing checks run.

@talatuyarer - can you rebase off of main to make sure that you've got Russell's new dependency checks?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like it was already pulled transitively and already part of runtime-deps.txt, hence no diff here

com.google.cloud:google-cloud-monitoring:3.92.0

👍

@talatuyarer talatuyarer requested a review from stevenzwu May 5, 2026 15:44
@talatuyarer talatuyarer force-pushed the gcp-cloud-monitoring branch from c94ffc9 to 3a062b4 Compare May 5, 2026 19:58
Comment on lines +78 to +87
* GCS project ID.
*/
public static final String GCP_MONITORING_PROJECT_ID = "gcp.monitoring.project-id";

/** Controls the metric prefix used for Google Cloud Monitoring metrics. */
public static final String GCP_MONITORING_METRIC_PREFIX = "gcp.monitoring.metric-prefix";

/** Default metric prefix for Google Cloud Monitoring metrics. */
public static final String GCP_MONITORING_METRIC_PREFIX_DEFAULT = "custom.googleapis.com/iceberg";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: gcs vs gcp. i see we use gcs. prefix in all the other places. If we are starting to use gcp., we should document it

Comment thread gcp-bundle/build.gradle
implementation "com.google.cloud:google-cloud-bigquery"
implementation "com.google.cloud:google-cloud-core"
implementation "com.google.cloud:google-cloud-kms"
implementation "com.google.cloud:google-cloud-monitoring"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like it was already pulled transitively and already part of runtime-deps.txt, hence no diff here

com.google.cloud:google-cloud-monitoring:3.92.0

👍

	modified:   build.gradle
	modified:   docs/docs/metrics-reporting.md
	modified:   gcp-bundle/build.gradle
	new file:   gcp/src/integration/java/org/apache/iceberg/gcp/metrics/TestCloudMonitoringMetricsReporterIntegration.java
	modified:   gcp/src/main/java/org/apache/iceberg/gcp/GCPProperties.java
	new file:   gcp/src/main/java/org/apache/iceberg/gcp/metrics/CloudMonitoringMetricsReporter.java
	new file:   gcp/src/test/java/org/apache/iceberg/gcp/metrics/TestCloudMonitoringMetricsReporter.java
@talatuyarer talatuyarer force-pushed the gcp-cloud-monitoring branch from 975cbc5 to 73cb399 Compare May 13, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants