|
iceberg-cpp
|
Interface for reporting metrics from Iceberg operations. More...
#include <metrics_reporter.h>
Public Member Functions | |
| virtual Status | Initialize (const std::unordered_map< std::string, std::string > &properties) |
| Initialize the reporter with catalog properties after construction. | |
| virtual Status | Report (const MetricsReport &report)=0 |
| Report a metrics report. | |
Interface for reporting metrics from Iceberg operations.
Implementations of this interface can be used to collect and report metrics about scan and commit operations. Common implementations include logging reporters, metrics collectors, and the noop reporter for testing.
Implementations must not throw. Return an error Status instead.
|
inlinevirtual |
Initialize the reporter with catalog properties after construction.
Called by MetricsReporters::Load() before the first Report() invocation. The default implementation is a no-op. Override to perform property-based setup (e.g., configure endpoints, credentials, sampling rates).
Reimplemented in iceberg::InitializingReporter.
|
pure virtual |
Report a metrics report.
Implementations should handle the report according to their purpose (e.g., logging, sending to a metrics service, etc.).
| report | The metrics report to process. |
Implemented in iceberg::FailingMetricsReporter, iceberg::ThrowingMetricsReporter, iceberg::InitializingReporter, iceberg::CompositeMetricsReporter, and iceberg::CollectingMetricsReporter.