feat: metrics integration for commit and scan - #701
Merged
Conversation
evindj
marked this pull request as draft
June 7, 2026 00:12
evindj
marked this pull request as ready for review
June 13, 2026 18:07
wgtmac
reviewed
Jun 18, 2026
There was a problem hiding this comment.
Pull request overview
Adds core metrics reporting to Iceberg C++ commit and scan workflows, including wiring metrics reporters through catalogs/tables and emitting REST-spec-compatible reports.
Changes:
- Emit
CommitReportfromTransaction::Commit()when a commit produces a new snapshot, and propagate table reporters into update operations. - Collect and emit
ScanReport(with scan planning counters/timers) fromDataTableScan::PlanFiles(), including new manifest/file skip counters. - Introduce
RestMetricsReporterand catalog-level wiring (REST/SQL/InMemory) plus new end-to-end/unit tests for scan planning and REST reporter behavior.
Reviewed changes
Copilot reviewed 28 out of 29 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/iceberg/update/snapshot_update.h | Adds per-snapshot-update reporter plumbing (ReportWith) and stores a reporter pointer. |
| src/iceberg/transaction.cc | Adds commit timing/attempt metrics and emits CommitReport after successful snapshot-producing commits; propagates reporter to FastAppend in transactions. |
| src/iceberg/test/scan_planning_metrics_test.cc | New end-to-end tests validating ScanReport emission and scan planning counters. |
| src/iceberg/test/rest_metrics_reporter_test.cc | New tests asserting REST reporter suppresses HTTP failures. |
| src/iceberg/test/fast_append_test.cc | Adds integration tests verifying CommitReport emission behavior for snapshot vs property-only commits. |
| src/iceberg/test/CMakeLists.txt | Registers the new test sources in the build. |
| src/iceberg/table.h | Extends Table::Make/StagedTable::Make to accept an optional reporter; adds reporter accessors and combining API. |
| src/iceberg/table.cc | Stores reporter on tables; wires reporter + table name into scans and propagates reporter to FastAppend. |
| src/iceberg/table_scan.h | Extends scan context and builder API to include table name + metrics reporter. |
| src/iceberg/table_scan.cc | Collects scan planning metrics, attaches them to manifest planning, and emits ScanReport. |
| src/iceberg/manifest/manifest_reader.h | Adds SkipCounter() hook to count per-entry skips during manifest reading. |
| src/iceberg/manifest/manifest_reader.cc | Implements skip counting for partition/metrics/partition-set filtering. |
| src/iceberg/manifest/manifest_reader_internal.h | Stores skip_counter_ in the reader implementation. |
| src/iceberg/manifest/manifest_group.h | Adds ability to attach scan metrics to manifest planning. |
| src/iceberg/manifest/manifest_group.cc | Increments scan counters for manifests/files and delete-file result accounting; wires reader skip counter. |
| src/iceberg/delete_file_index.h | Adds optional scan metrics hook (non-owning) for delete-manifest accounting. |
| src/iceberg/delete_file_index.cc | Counts scanned/skipped delete manifests and skipped delete files while building the delete index. |
| src/iceberg/catalog/sql/sql_catalog.h | Stores a catalog-level reporter for tables loaded/created by SQL catalog. |
| src/iceberg/catalog/sql/sql_catalog.cc | Loads configured reporter and passes it into created/loaded tables. |
| src/iceberg/catalog/rest/rest_metrics_reporter.h | Introduces REST metrics reporter interface for POSTing reports to the REST endpoint. |
| src/iceberg/catalog/rest/rest_metrics_reporter.cc | Implements JSON serialization + POST and suppresses failures (fire-and-forget). |
| src/iceberg/catalog/rest/rest_catalog.h | Switches REST catalog HTTP client ownership to shared_ptr; adds per-table reporter builder. |
| src/iceberg/catalog/rest/rest_catalog.cc | Loads configured reporter and optionally combines it with a per-table REST reporter when enabled/supported. |
| src/iceberg/catalog/rest/meson.build | Adds new REST metrics reporter source to Meson build. |
| src/iceberg/catalog/rest/CMakeLists.txt | Adds new REST metrics reporter source to CMake build. |
| src/iceberg/catalog/rest/catalog_properties.h | Adds rest-metrics-reporting-enabled property. |
| src/iceberg/catalog/memory/in_memory_catalog.h | Stores a catalog-level reporter for in-memory catalog tables. |
| src/iceberg/catalog/memory/in_memory_catalog.cc | Loads configured reporter and passes it into created/loaded tables. |
| .gitignore | Ignores additional build output directories. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wgtmac
reviewed
Jun 18, 2026
evindj
force-pushed
the
metrics_integration
branch
from
June 25, 2026 20:46
1b32f3d to
5d8344f
Compare
wgtmac
reviewed
Jun 30, 2026
wgtmac
reviewed
Jun 30, 2026
wgtmac
reviewed
Jun 30, 2026
evindj
force-pushed
the
metrics_integration
branch
2 times, most recently
from
July 2, 2026 21:48
3dd8a4d to
4e294a3
Compare
wgtmac
reviewed
Jul 7, 2026
evindj
force-pushed
the
metrics_integration
branch
from
July 23, 2026 06:22
4e294a3 to
b7692f5
Compare
This change implements part 2 of the core metrics. it covers RestCatalog spec, integration with commit and scan workflows. It leaves the logging metrics reporter out of scope, it will be added in a subsequent diff.
some other differences is that some of the http calls for the RestCatalogMetrics reporter is still synchronous a subsequent change will cover that.