tanmayrauth opened a new pull request, #1767:
URL: https://github.com/apache/iceberg-go/pull/1767
Seventh and final PR of the metrics reporting stack.
What this adds
A new in-module metrics/otel package with an OpenTelemetry-backed
metrics.Reporter. It maps the high-value ScanReport/CommitReport fields to a
curated set of OTel instruments so scan/commit metrics can flow to any OTLP
backend (Prometheus, Datadog, CloudWatch, …).
- Host owns the SDK. The reporter takes a Meter from the global
MeterProvider, or one supplied via WithMeter. With no SDK registered, the
instruments are no-ops and metric calls are silently dropped — the standard
OTel contract.
- Bounded cardinality. The attribute set (table-name, schema-id,
operation) is configurable via WithAttributes; snapshot ID is never a metric
attribute.
- Instrument modeling. Durations are histograms (per-operation
distribution preserved); counts are monotonic counters (throughput). This
trade-off, and the deliberate omission of the delete path from the initial
curated set, are documented in the package doc.
- Kept as an in-module package rather than a separate module because
go.opentelemetry.io is already a dependency.
Testing
metrics/otel unit tests cover scan/commit emission, attribute allowlisting
(scan and commit), pointer and typed-nil report dispatch, Close, and the
default global-meter path.
▎ Caveat: the emitted metric names, units, and attributes are not yet
stable. They mirror Java's unmerged, provisional OtelMetricsReporter
(apache/iceberg#16250) and may change to track it or a future OpenTelemetry
semantic convention.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]