Skip to content

Commit 088e2dd

Browse files
adapt unit tests to new metrics
1 parent 6f8e403 commit 088e2dd

File tree

2 files changed

+317
-251
lines changed

2 files changed

+317
-251
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class IcebergMetricsReporter implements MetricsReporter {
2323
private static final AttributeKey<Long> SCHEMA_ID = AttributeKey.longKey("iceberg.schema.id");
2424
private static final AttributeKey<String> TABLE_NAME =
2525
AttributeKey.stringKey("iceberg.table.name");
26-
private static final AttributeKey<Long> SNAPHSOT_ID = AttributeKey.longKey("iceberg.snapshot.id");
26+
private static final AttributeKey<Long> SNAPSHOT_ID = AttributeKey.longKey("iceberg.snapshot.id");
2727
private static final AttributeKey<String> SCAN_STATE =
2828
AttributeKey.stringKey("iceberg.scan.state");
2929
private static final AttributeKey<String> DELETE_TYPE =
@@ -61,7 +61,7 @@ void reportScanMetrics(ScanReport scanReport) {
6161
Long.valueOf(scanReport.schemaId()),
6262
TABLE_NAME,
6363
scanReport.tableName(),
64-
SNAPHSOT_ID,
64+
SNAPSHOT_ID,
6565
scanReport.snapshotId());
6666
ScanMetricsResult metrics = scanReport.scanMetrics();
6767
TimerResult duration = metrics.totalPlanningDuration();
@@ -205,7 +205,7 @@ void reportScanMetrics(ScanReport scanReport) {
205205
}
206206
}
207207

208-
private void addValueToLongCounter(
208+
private static void addValueToLongCounter(
209209
LongCounter metric,
210210
long measurement,
211211
Attributes attributes,
@@ -215,7 +215,7 @@ private void addValueToLongCounter(
215215
metric.add(measurement, newAttributes);
216216
}
217217

218-
private void addValueToLongCounter(
218+
private static void addValueToLongCounter(
219219
LongCounter metric,
220220
long measurement,
221221
Attributes attributes,

0 commit comments

Comments
 (0)