Skip to content

Commit d7f72ef

Browse files
add javadocs to the public class
1 parent 978aa55 commit d7f72ef

File tree

1 file changed

+13
-1
lines changed
  • instrumentation/iceberg-1.8/library/src/main/java/io/opentelemetry/instrumentation/iceberg/v1_8

1 file changed

+13
-1
lines changed

instrumentation/iceberg-1.8/library/src/main/java/io/opentelemetry/instrumentation/iceberg/v1_8/IcebergTelemetry.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@
55

66
package io.opentelemetry.instrumentation.iceberg.v1_8;
77

8-
import io.opentelemetry.api.OpenTelemetry;
98
import org.apache.iceberg.Scan;
109
import org.apache.iceberg.ScanTask;
1110
import org.apache.iceberg.ScanTaskGroup;
1211

12+
import io.opentelemetry.api.OpenTelemetry;
13+
14+
/** Entrypoint for instrumenting Apache Iceberg scan metrics */
1315
public final class IcebergTelemetry {
1416
private final OpenTelemetry openTelemetry;
1517

18+
/** Returns a new {@link IcebergTelemetry} configured with the given {@link OpenTelemetry}. */
1619
public static IcebergTelemetry create(OpenTelemetry openTelemetry) {
1720
return new IcebergTelemetry(openTelemetry);
1821
}
@@ -21,6 +24,15 @@ public static IcebergTelemetry create(OpenTelemetry openTelemetry) {
2124
this.openTelemetry = openTelemetry;
2225
}
2326

27+
/**
28+
* Creates a new {@link Scan} instance based on an existing {@link Scan} instance. The new instance is associated
29+
* with a custom {@link org.apache.iceberg.metrics.MetricsReporter} that reports scan metrics using the configured {@link OpenTelemetry} instance.
30+
* @param <T1> the child class, returned by method chaining, e.g., {@link Scan#project(org.apache.iceberg.Schema)}
31+
* @param <T2> the type of tasks produces by this scan
32+
* @param <T3> the type of task groups produces by this scan
33+
* @param scan the original scan instance that will be instrumented
34+
* @return an instrumented {@link Scan} instance based on the provided instance
35+
*/
2436
public <T1, T2 extends ScanTask, T3 extends ScanTaskGroup<T2>> T1 wrapScan(
2537
Scan<T1, T2, T3> scan) {
2638
return scan.metricsReporter(new IcebergMetricsReporter(openTelemetry));

0 commit comments

Comments
 (0)