github open-telemetry/opentelemetry-go v1.47.0
v1.47.0/v0.69.0/v0.23.0/v0.1.0

3 hours ago

This release contains the first stable release of the OpenTelemetry Go Logs API and SDK.
Our project stability guarantees now apply to the following modules:

  • go.opentelemetry.io/otel/log
  • go.opentelemetry.io/otel/sdk/log

See our versioning policy for more information about these stability guarantees.

Added

  • Add String method for KeyValue type in go.opentelemetry.io/otel/attribute. (#8205)
  • Add String method for Set type in go.opentelemetry.io/otel/attribute. (#8347)
  • Add WithMaxExportBatchSize to go.opentelemetry.io/otel/sdk/metric to configure the maximum export batch size for PeriodicReader. (#8960)
  • Add WithAttributeValueDepthLimit, DefaultAttributeValueDepthLimit, and SpanLimits.AttributeValueDepthLimit in go.opentelemetry.io/otel/sdk/trace to configure the maximum depth of span, event, link, and instrumentation scope attribute values. (#8938)
  • Add WithAttributeValueDepthLimit in go.opentelemetry.io/otel/sdk/log to configure the maximum depth of log record and instrumentation scope attribute values. (#8938)
  • Add WithMaxResponseSize to go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp,
    go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp, and
    go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp. (#8941)
  • Add experimental ProbabilitySampler in go.opentelemetry.io/otel/sdk/trace/x that conforms to the OpenTelemetry specification's threshold-based sampling algorithm. (#8123)
  • Add experimental *Binder extension interfaces in go.opentelemetry.io/otel/metric/x for instruments that support binding attributes ahead of time. (#8760)
  • Add the experimental Finisher synchronous metric instrument extension interface to go.opentelemetry.io/otel/metric/x. (#8906)

Changed

  • Use the OpenTelemetry Attribute Collection representation for non-OTLP protocols for metric data diffs in go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest. (#8993)
  • Apply a maximum depth of 64 by default to span, event, link, log record, and instrumentation scope attribute values in go.opentelemetry.io/otel/sdk/trace and go.opentelemetry.io/otel/sdk/log. (#8938)
  • Reduce allocations when applying attribute value length limits in go.opentelemetry.io/otel/sdk/trace and go.opentelemetry.io/otel/sdk/log by rebuilding composite values only when truncation is needed. (#8912)
  • Decode traceparent using a hex lookup table in go.opentelemetry.io/otel/propagation, which rejects the specification-disallowed upper-case characters without a separate scan of the header. (#8739)
  • Decode all characters at constant indices in TraceIDFromHex and SpanIDFromHex in go.opentelemetry.io/otel/trace to eliminate bounds checks. (#8740)

Fixed

  • Count valid U+FFFD replacement characters toward attribute value length limits in go.opentelemetry.io/otel/trace, go.opentelemetry.io/otel/sdk/trace, and go.opentelemetry.io/otel/sdk/log.
  • Truncate string attribute values to empty strings when the configured length limit is zero, including malformed UTF-8, in go.opentelemetry.io/otel/trace, go.opentelemetry.io/otel/sdk/trace, and go.opentelemetry.io/otel/sdk/log. (#9054)
  • Fix a data race in NewPeriodicReader where r.inst was assigned after the background goroutine was launched in go.opentelemetry.io/otel/sdk/metric. (#9028)
  • Prevent precision loss for large int64 values in Sum, Histogram, and ExponentialHistogram aggregations in go.opentelemetry.io/otel/sdk/metric. (#8981)
  • Ensure grpc.DialOption values passed via WithDialOption take precedence over conflicting internally-computed defaults in
    go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc,
    go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc, and
    go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc. (#8805, #8834, #8836)
  • Treat overflowing OTEL_METRIC_EXPORT_INTERVAL and OTEL_METRIC_EXPORT_TIMEOUT values as invalid in go.opentelemetry.io/otel/sdk/metric. (#8800)
  • Prevent a panic in NewFixedSizeReservoir and FixedSizeReservoirProvider when given a negative size in go.opentelemetry.io/otel/sdk/metric/exemplar; negative sizes are now clamped to zero, consistent with a size of zero. (#8832)
  • Preserve exponential histogram ZeroThreshold during OTLP metric export in go.opentelemetry.io/otel/exporters/otlp/otlpmetric. (#8801)
  • Ensure metric helpers in go.opentelemetry.io/otel/semconv/v1.32.0, go.opentelemetry.io/otel/semconv/v1.33.0, and go.opentelemetry.io/otel/semconv/v1.34.0 record measurements only once when no attributes are provided. (#8849)
  • Treat empty OTEL_TRACES_SAMPLER and OTEL_TRACES_SAMPLER_ARG values as unset in go.opentelemetry.io/otel/sdk/trace. (#8873)
  • Normalize global OTEL_EXPORTER_OTLP_ENDPOINT path joining in go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp so trailing-slash base URLs do not produce double-slash log export paths. (#8864)
  • Prevent a deadlock when formatting an error passed to RecordError calls back into the span in go.opentelemetry.io/otel/sdk/trace. (#8815)
  • Prevent SimpleSpanProcessor.Shutdown from panicking when constructed with a nil exporter in go.opentelemetry.io/otel/sdk/trace. (#8844)
  • Propagate invalid exponential histogram scale errors to Prometheus exporter self-observability metrics in go.opentelemetry.io/otel/exporters/prometheus. (#8839)
  • Retain instrument advisory attributes configured with go.opentelemetry.io/otel/metric/x.WithDefaultAttributes when a matching View in go.opentelemetry.io/otel/sdk/metric does not specify an attribute filter. (#8859)
  • Ignore HTTP URL paths when building OTLP/gRPC metric exporter targets from OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_METRICS_ENDPOINT, while preserving unix:// and unix-abstract:// targets; treat unix-abstract:// endpoints as insecure in go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc and go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp. (#8862)
  • Ignore HTTP(S) paths when deriving gRPC trace exporter endpoints from OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_TRACES_ENDPOINT in go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc. (#8852)
  • Bound memory used while parsing dense W3C property metadata by storing it compactly and materializing Property values on demand in go.opentelemetry.io/otel/baggage and go.opentelemetry.io/otel/propagation.

Removed

  • Remove the experimental OTEL_GO_X_METRIC_EXPORT_BATCH_SIZE environment variable in go.opentelemetry.io/otel/sdk/metric.
    Use the WithMaxExportBatchSize option instead. (#8960)

What's Changed

  • Prevent panic in FixedSizeReservoir for negative sizes by @chiliec in #8832
  • fix(metric): reject overflowing export durations by @maithilijoshi20 in #8800
  • chore(deps): update module github.com/gofrs/flock to v0.13.1 by @renovate[bot] in #8885
  • chore(deps): update module github.com/4meepo/tagalign to v1.4.4 by @renovate[bot] in #8900
  • fix(deps): update googleapis to 18b4a75 by @renovate[bot] in #8907
  • fix(deps): update module github.com/prometheus/client_model to v0.6.3 by @renovate[bot] in #8908
  • chore(deps): update module github.com/prometheus/procfs to v0.22.0 by @renovate[bot] in #8894
  • chore(deps): update module github.com/godoc-lint/godoc-lint to v0.11.4 by @renovate[bot] in #8897
  • chore(deps): update github.com/charmbracelet/ultraviolet digest to d60c349 by @renovate[bot] in #8909
  • fix(deps): update module github.com/prometheus/common to v0.71.0 by @renovate[bot] in #8911
  • chore(deps): update golang.org/x/telemetry digest to 86cb573 by @renovate[bot] in #8895
  • fix(deps): update github.com/opentracing-contrib/go-grpc/test digest to 7bb06b0 by @renovate[bot] in #8902
  • chore(deps): update module github.com/timonwong/loggercheck to v0.12.0 by @renovate[bot] in #8898
  • [otlptracegrpc] Grpc dialoption override bug by @ps-mir in #8805
  • otlpmetricgrpc: fix preference for user supplied dialOptions by @ps-mir in #8834
  • Do not panic on nil exporter in SimpleSpanProcessor.Shutdown by @ShreeyashPatil2708 in #8844
  • [chore] Add doc comments to exported internal symbols (1/N) by @om7057 in #8752
  • [chore] Add doc comments to exported internal symbols (3/N) by @om7057 in #8869
  • [chore] docs: mark Logs as release candidate by @pellared in #8910
  • chore(deps): update module github.com/mattn/go-runewidth to v0.0.29 by @renovate[bot] in #8917
  • chore(deps): update github.com/charmbracelet/ultraviolet digest to af8eda3 by @renovate[bot] in #8915
  • chore(deps): update github.com/golangci/rowserrcheck digest to 241134d by @renovate[bot] in #8913
  • fix(deps): update module go.opentelemetry.io/collector/pdata to v1.66.0 by @renovate[bot] in #8918
  • chore(deps): update otel/weaver docker tag to v0.26.1 by @renovate[bot] in #8922
  • chore(deps): update open-telemetry/shared-workflows action to v0.13.0 by @renovate[bot] in #8921
  • chore(deps): update github.com/charmbracelet/ultraviolet digest to 043ea8a by @renovate[bot] in #8919
  • fix(otlploggrpc): honor custom dial option precedence by @jstar0 in #8836
  • Define bound instrument API in metric/x by @dashpole in #8760
  • fix(prometheus): report invalid histogram scale errors by @jstar0 in #8839
  • Add experimental metric Finisher interface by @MrAlias in #8906
  • chore(deps): update github.com/charmbracelet/ultraviolet digest to ae99b73 by @renovate[bot] in #8923
  • chore(deps): update golang.org/x by @renovate[bot] in #8920
  • sdk/trace/x: Add experimental ProbabilitySampler by @yuanyuanzhao3 in #8123
  • sdk/trace/x: Adding GoDev badge. by @yuanyuanzhao3 in #8927
  • perf(propagation): use a hex lookup table to decode traceparent by @itssaharsh in #8739
  • chore(deps): update github.com/charmbracelet/ultraviolet digest to 0277a17 by @renovate[bot] in #8931
  • fix(deps): update googleapis to f8649dd by @renovate[bot] in #8929
  • chore(deps): update module github.com/dlclark/regexp2/v2 to v2.8.0 by @renovate[bot] in #8930
  • [chore] Add doc comments to exported internal symbols (5/N) by @om7057 in #8934
  • [chore] Add doc comments to exported internal symbols (4/N) by @om7057 in #8926
  • sdk: optimize composite attribute truncation by @pellared in #8912
  • chore(deps): update module github.com/go-critic/go-critic to v0.15.0 by @renovate[bot] in #8924
  • chore(deps): update module go.augendre.info/fatcontext to v0.10.1 by @renovate[bot] in #8939
  • chore(deps): update module mvdan.cc/gofumpt to v0.12.0 by @renovate[bot] in #8935
  • chore(deps): update module dev.gaijin.team/go/exhaustruct/v5 to v5.2.0 by @renovate[bot] in #8928
  • fix(deps): update golang.org/x by @renovate[bot] in #8936
  • chore(deps): update module github.com/ghostiam/protogetter to v1.0.1 by @renovate[bot] in #8940
  • fix(trace): avoid reentrant RecordError deadlock by @jstar0 in #8815
  • [chore] Add doc comments to exported internal symbols (6/6), remove exclusion by @om7057 in #8937
  • otlploghttp: normalize global endpoint path joining by @RedZapdos123 in #8864
  • sdk/trace: treat empty sampler env values as unset by @RedZapdos123 in #8873
  • Run full benchmarks weekly by @XSAM in #8932
  • fix(semconv): avoid duplicate metric recording without attributes by @jstar0 in #8849
  • chore(deps): update module github.com/mattn/go-runewidth to v0.0.30 by @renovate[bot] in #8946
  • chore(deps): update ubuntu:26.04 docker digest to e5a4d62 by @renovate[bot] in #8945
  • chore(deps): update github/codeql-action action to v4.38.0 by @renovate[bot] in #8944
  • chore(deps): update golang.org/x/telemetry digest to 55ac43c by @renovate[bot] in #8943
  • otlptracegrpc: fix env endpoint URL parsing by @RedZapdos123 in #8852
  • otlpmetricgrpc: preserve gRPC env endpoint targets by @RedZapdos123 in #8862
  • chore(deps): update module github.com/sourcegraph/go-diff to v0.9.0 by @renovate[bot] in #8947
  • feat(otlphttp): configure maximum response size by @pellared in #8941
  • fix(otlpmetric): preserve exponential histogram zero threshold by @maithilijoshi20 in #8801
  • chore(deps): update golang.org/x/telemetry digest to 15ceca2 by @renovate[bot] in #8948
  • chore(deps): update github.com/charmbracelet/ultraviolet digest to 6c9e17d by @renovate[bot] in #8950
  • chore(deps): update module github.com/dave/dst to v0.28.0 by @renovate[bot] in #8949
  • fix(deps): update googleapis to f61a6ca by @renovate[bot] in #8951
  • chore(deps): update module github.com/nishanths/exhaustive to v0.13.0 by @renovate[bot] in #8953
  • chore(deps): update module github.com/xo/terminfo to v1.2.0 by @renovate[bot] in #8954
  • sdk/log: add queue_full shutdown regression test by @RedZapdos123 in #8754
  • internal/tools/verifyreadmes: skip hidden dot-directories on Windows by @RedZapdos123 in #8729
  • sdk/metric: add internal finish-aware Sum lifecycle by @MrAlias in #8925
  • sdk: limit nested attribute value depth by @pellared in #8938
  • chore(deps): update codecov/codecov-action action to v7.1.0 by @renovate[bot] in #8966
  • fix(deps): update module go.opentelemetry.io/collector/pdata to v1.67.0 by @renovate[bot] in #8965
  • chore(deps): update open-telemetry/shared-workflows action to v0.14.0 by @renovate[bot] in #8961
  • Fix Alex Kats emeritus mention by @dmathieu in #8933
  • sdk/metric: stabilize max batch size in PeriodicReader by @dashpole in #8960
  • chore(deps): update ubuntu:26.04 docker digest to 61ebaa5 by @renovate[bot] in #8968
  • sdk/metric: Retain advisory attributes when View has no AttributeFilter by @dashpole in #8859
  • chore(deps): update module github.com/ldez/tagliatelle to v0.8.0 by @renovate[bot] in #8970
  • sdk/metric: Document nil AttributeFilter behavior by @pellared in #8971
  • chore: fix gofumpt extra-rules warning by @dmathieu in #8942
  • chore(deps): update codecov/codecov-action action to v7.1.1 by @renovate[bot] in #8975
  • chore(deps): update module github.com/ldez/gomoddirectives to v0.10.0 by @renovate[bot] in #8974
  • sdk/trace/x: deduplicate tracestate combination error report in ProbabilitySampler by @alex131125 in #8969
  • [chore]: fix article and word typos in doc comments by @simpleqt in #8972
  • [chore]: fix two doc comments that name the wrong method by @simpleqt in #8973
  • Update googleapis to eeb232e by @renovate[bot] in #8983
  • sdk/metric: extract generic hotColdMap for delta aggregators by @dashpole in #8756
  • Update github/codeql-action action to v4.38.1 by @renovate[bot] in #8987
  • Update googleapis to cecb647 by @renovate[bot] in #8986
  • [chore]: remove CLAUDE.md in favor of AGENTS.md by @jarrensj in #8988
  • test(internal/tools/verifyreadmes): add unit tests for verifyReadme by @marcschaeferger in #8066
  • perf(trace): unroll hex decoders to drop bounds checks by @itssaharsh in #8740
  • sdk/metric: add canonical attribute identity by @MrAlias in #8963
  • attribute: add Set.String by @iyiola-dev in #8347
  • attribute: add String method for KeyValue by @pellared in #8205
  • Update open-telemetry/shared-workflows action to v0.15.0 by @renovate[bot] in #8992
  • Update googleapis to b142276 by @renovate[bot] in #8991
  • Update golang.org/x/telemetry digest to bdcd072 by @renovate[bot] in #8990
  • Update module google.golang.org/grpc to v1.84.0 by @renovate[bot] in #8982
  • Update open-telemetry/shared-workflows action to v0.16.0 by @renovate[bot] in #8995
  • Update github.com/opentracing-contrib/go-grpc/test digest to c4b3818 by @renovate[bot] in #8994
  • Revert "Update module google.golang.org/grpc to v1.84.0 (#8982)" by @dashpole in #8997
  • metricdatatest: use attribute collection formatting by @pellared in #8993
  • Update github.com/charmbracelet/ultraviolet digest to 4e49372 by @renovate[bot] in #8998
  • fix(sdk/metric): preserve int64 precision in sum and histogram aggregations by @dashpole in #8981
  • Update golang.org/x/telemetry digest to c6096d2 by @renovate[bot] in #9000
  • Fix OSS-Fuzz issues in FuzzHashKVs, FuzzGetBin, and FuzzSpanIDFromHex by @dashpole in #8996
  • Update github.com/timakin/bodyclose digest to 98ded9a by @renovate[bot] in #9003
  • Update module github.com/ProtonMail/go-crypto to v1.5.0 by @renovate[bot] in #9004
  • Update module github.com/ProtonMail/go-crypto to v1.5.1 by @renovate[bot] in #9021
  • Update golang.org/x/telemetry digest to 9662f6f by @renovate[bot] in #9020
  • Update module github.com/mgechev/revive to v1.17.0 by @renovate[bot] in #9022
  • Add ps-mir as an approver by @MrAlias in #9018
  • Add Marc Schäfer as a project Triager by @MrAlias in #9019
  • Update golang.org/x/telemetry digest to ed294f9 by @renovate[bot] in #9027
  • Update github/codeql-action action to v4.38.2 by @renovate[bot] in #9025
  • Update module github.com/golangci/golangci-lint/v2 to v2.14.0 by @renovate[bot] in #9026
  • Update github.com/charmbracelet/ultraviolet digest to b78653f by @renovate[bot] in #9036
  • Update github.com/charmbracelet/ultraviolet digest to bbf040a by @renovate[bot] in #9037
  • Update module github.com/golangci/golines to v0.16.0 by @renovate[bot] in #9043
  • Update module github.com/prometheus/common to v0.72.0 by @renovate[bot] in #9044
  • Update module go.opentelemetry.io/collector/pdata to v1.68.0 by @renovate[bot] in #9046
  • Update module github.com/uudashr/iface to v1.5.2 by @renovate[bot] in #9042
  • Update module github.com/ProtonMail/go-crypto to v1.5.2 by @renovate[bot] in #9040
  • Update open-telemetry/shared-workflows action to v0.17.0 by @renovate[bot] in #9047
  • Update github.com/golangci/canonicalheader digest to e18e5c5 by @renovate[bot] in #9039
  • Update googleapis to 8a89bd6 by @renovate[bot] in #9041
  • Update github.com/charmbracelet/ultraviolet digest to 666ce5e by @renovate[bot] in #9051
  • Remove retired Go Report Card badge from README by @kijimad in #9050
  • fix(sdk/metric): Fix data race with initialization of NewPeriodicReader by @CTrando in #9028
  • Update module github.com/dlclark/regexp2/v2 to v2.8.1 by @renovate[bot] in #9061
  • Update github.com/charmbracelet/ultraviolet digest to 270558f by @renovate[bot] in #9060
  • chore: Replace deprecated gofumpt extra-rules with extra options by @kijimad in #9062
  • Update module github.com/pjbgf/sha1cd to v0.7.0 by @renovate[bot] in #9064
  • Update github.com/golangci/rowserrcheck digest to f772fe6 by @renovate[bot] in #9066
  • Update github.com/charmbracelet/ultraviolet digest to 8786532 by @renovate[bot] in #9065
  • Fix zero attribute value length for malformed UTF-8 by @pellared in #9054
  • Update module github.com/uudashr/iface to v1.5.3 by @renovate[bot] in #9067
  • Update ubuntu:26.04 Docker digest to 88a381d by @renovate[bot] in #9069
  • Release 1.47.0/0.69.0/0.23.0/0.1.0 by @pellared in #9024

New Contributors

Full Changelog: v1.47.0-rc.1...v1.47.0

Don't miss a new opentelemetry-go release

NewReleases is sending notifications on new releases.