Factory class for creating and managing MetricsReporter instances.
More...
#include <metrics_reporters.h>
Factory class for creating and managing MetricsReporter instances.
This class provides a registry-based factory for creating MetricsReporter implementations. Custom reporter implementations can be registered using the Register() method.
◆ Combine()
Combine two reporters into one.
- Parameters
-
| first | First reporter, may be nullptr. |
| second | Second reporter, may be nullptr. |
- Returns
- Combined reporter, or nullptr if both inputs are nullptr.
◆ Load()
| Result< std::unique_ptr< MetricsReporter > > iceberg::MetricsReporters::Load |
( |
const std::unordered_map< std::string, std::string > & |
properties | ) |
|
|
static |
Load a metrics reporter based on properties.
This method looks up the "metrics-reporter-impl" property to determine which reporter implementation to create. If not specified, returns a NoopMetricsReporter.
- Parameters
-
| properties | Configuration properties containing reporter type. |
- Returns
- A new MetricsReporter instance or an error.
◆ Register()
Register a factory for a metrics reporter type.
Thread-safe. Registrations can be performed at any time, including concurrently with Load().
- Parameters
-
| reporter_type | Type identifier matched case-sensitively against the value of "metrics-reporter-impl" in catalog properties, mirroring Java's fully-qualified class-name lookup (e.g., "noop"). |
| factory | Factory function that produces the reporter. |
- Returns
- OK if the registration succeeded, or an error if the factory is invalid.
The documentation for this class was generated from the following files: