Provides OpenTelemetry instrumentation for Apache Iceberg.
Replace OPENTELEMETRY_VERSION with the latest release.
For Maven, add to your pom.xml dependencies:
<dependencies>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-iceberg-1.8</artifactId>
<version>OPENTELEMETRY_VERSION</version>
</dependency>
</dependencies>For Gradle, add to your dependencies:
implementation("io.opentelemetry.instrumentation:opentelemetry-iceberg-1.8:OPENTELEMETRY_VERSION")The instrumentation library allows creating instrumented Scan (e.g., TableScan) instances for collecting and reporting OpenTelemetry-based scan metrics. For example:
OpenTelemetry openTelemetry = // ...
IcebergTelemetry icebergTelemetry = IcebergTelemetry.create(openTelemetry);
TableScan tableScan = icebergTelemetry.wrapScan(table.newScan());
try (CloseableIterable<FileScanTask> fileScanTasks = tableScan.planFiles()) {
// Process the scan tasks
}
// The metrics will be reported after the scan tasks iterable is closed