This release dramatically improves interoperability with Go's log/slog package. In particular, logr.NewContext and logr.NewContextWithSlogLogger use the same context key, which allows logr.FromContext and logr.FromContextAsSlogLogger to return logr.Logger or *slog.Logger respectively, including transparently converting each to the other as needed.
Functions logr/slogr.NewLogr and logr/slogr.ToSlogHandler have been superceded by logr.FromSlogHandler and logr.ToSlogHandler respectively, and type logr/slogr.SlogSink has been superceded by logr.SlogSink. All of the old names in logr/slogr remain, for compatibility.
Package logr/funcr now supports logr.SlogSink, meaning that it's output passes all but one of the Slog conformance tests (that exception being that funcr handles the timestamp itself).
Users who have a logr.Logger and need a *slog.Logger can call slog.New(logr.ToSlogHandler(...)) and all output will go through the same stack.
Users who have a *slog.Logger or slog.Handler can call logr.FromSlogHandler(...) and all output will go through the same stack.
[breaking] Add err chan to log producer and don't panic on error (#1971) @Tofel
If you are starting a log producer, it's now possible to pass log options in a variadic manner (at this moment only the log producer timeout option is available). So this breaking change will affect you if and only if you are assigning the StartLogProducer method of a container to a variable.
🚀 Features
feat: include PostReady hook, defining proper execution order for container lifecycle hooks (#1922) @mdelapenya
Add client metric support to go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp. (#4707)
Add peer attributes to spans recorded by NewClientHandler, NewServerHandler in go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc. (#4873)
Add support for cloud.account.id, cloud.availability_zone and cloud.region in the AWS ECS detector. (#4860)
Changed
The fallback options in go.opentelemetry.io/contrib/exporters/autoexport now accept factory functions. (#4891)
WithFallbackMetricReader(metric.Reader) MetricOption is replaced with func WithFallbackMetricReader(func(context.Context) (metric.Reader, error)) MetricOption.
WithFallbackSpanExporter(trace.SpanExporter) SpanOption is replaced with WithFallbackSpanExporter(func(context.Context) (trace.SpanExporter, error)) SpanOption.
The http.server.request_content_length metric in go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp is changed to http.server.request.size.(#4707)
The http.server.response_content_length metric in go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp is changed to http.server.response.size.(#4707)
Deprecated
The RequestCount, RequestContentLength, ResponseContentLength, ServerLatency constants in go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp are deprecated. (#4707)
Add support for Summary metrics to go.opentelemetry.io/contrib/bridges/prometheus. (#5089)
Add support for Exponential (native) Histograms in go.opentelemetry.io/contrib/bridges/prometheus. (#5093)
Implemented setting the cloud.resource_id resource attribute in go.opentelemetry.io/detectors/aws/ecs based on the ECS Metadata v4 endpoint. (#5091)
Removed
The deprecated RequestCount constant in go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp is removed. (#4894)
The deprecated RequestContentLength constant in go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp is removed. (#4894)
The deprecated ResponseContentLength constant in go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp is removed. (#4894)
The deprecated ServerLatency constant in go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp is removed. (#4894)
Fixed
Retrieving the body bytes count in go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp does not cause a data race anymore. (#5080)
[1.23.0/0.48.0/0.17.0/0.3.0] - 2024-02-06
Added
Add client metric support to go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp. (#4707)
Add peer attributes to spans recorded by NewClientHandler, NewServerHandler in go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc. (#4873)
Add support for cloud.account.id, cloud.availability_zone and cloud.region in the AWS ECS detector. (#4860)
Changed
The fallback options in go.opentelemetry.io/contrib/exporters/autoexport now accept factory functions. (#4891)
WithFallbackMetricReader(metric.Reader) MetricOption is replaced with func WithFallbackMetricReader(func(context.Context) (metric.Reader, error)) MetricOption.
WithFallbackSpanExporter(trace.SpanExporter) SpanOption is replaced with WithFallbackSpanExporter(func(context.Context) (trace.SpanExporter, error)) SpanOption.
The http.server.request_content_length metric in go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp is changed to http.server.request.size.(#4707)
The http.server.response_content_length metric in go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp is changed to http.server.response.size.(#4707)
Deprecated
The RequestCount, RequestContentLength, ResponseContentLength, ServerLatency constants in go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp are deprecated. (#4707)
Fixed
Do not panic in go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc if MeterProvider returns a nil instrument. (#4875)
Add exemplar support to go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc. (#4900)
Add exemplar support to go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp. (#4900)
The go.opentelemetry.io/otel/log module is added.
This module includes OpenTelemetry Go's implementation of the Logs Bridge API.
This module is in an alpha state, it is subject to breaking changes.
See our versioning policy for more info. (#4961)
Fixed
Fix registration of multiple callbacks when using the global meter provider from go.opentelemetry.io/otel. (#4945)
Fix negative buckets in output of exponential histograms. (#4956)
[1.23.1] 2024-02-07
Fixed
Register all callbacks passed during observable instrument creation instead of just the last one multiple times in go.opentelemetry.io/otel/sdk/metric. (#4888)
[1.23.0] 2024-02-06
This release contains the first stable, v1, release of the following modules:
See our versioning policy for more information about these stability guarantees.
Added
Add WithEndpointURL option to the exporters/otlp/otlpmetric/otlpmetricgrpc, exporters/otlp/otlpmetric/otlpmetrichttp, exporters/otlp/otlptrace/otlptracegrpc and exporters/otlp/otlptrace/otlptracehttp packages. (#4808)
Experimental exemplar exporting is added to the metric SDK.
See metric documentation for more information about this feature and how to enable it. (#4871)
ErrSchemaURLConflict is added to go.opentelemetry.io/otel/sdk/resource.
This error is returned when a merge of two Resources with different (non-empty) schema URL is attempted. (#4876)
Changed
The Merge and New functions in go.opentelemetry.io/otel/sdk/resource now returns a partial result if there is a schema URL merge conflict.
Add exemplar support to go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc. (#4900)
Add exemplar support to go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp. (#4900)
The go.opentelemetry.io/otel/log module is added.
This module includes OpenTelemetry Go's implementation of the Logs Bridge API.
This module is in an alpha state, it is subject to breaking changes.
See our versioning policy for more info. (#4961)
Fixed
Fix registration of multiple callbacks when using the global meter provider from go.opentelemetry.io/otel. (#4945)
Fix negative buckets in output of exponential histograms. (#4956)
[1.23.1] 2024-02-07
Fixed
Register all callbacks passed during observable instrument creation instead of just the last one multiple times in go.opentelemetry.io/otel/sdk/metric. (#4888)
[1.23.0] 2024-02-06
This release contains the first stable, v1, release of the following modules:
See our versioning policy for more information about these stability guarantees.
Added
Add WithEndpointURL option to the exporters/otlp/otlpmetric/otlpmetricgrpc, exporters/otlp/otlpmetric/otlpmetrichttp, exporters/otlp/otlptrace/otlptracegrpc and exporters/otlp/otlptrace/otlptracehttp packages. (#4808)
Experimental exemplar exporting is added to the metric SDK.
See metric documentation for more information about this feature and how to enable it. (#4871)
ErrSchemaURLConflict is added to go.opentelemetry.io/otel/sdk/resource.
This error is returned when a merge of two Resources with different (non-empty) schema URL is attempted. (#4876)
Changed
The Merge and New functions in go.opentelemetry.io/otel/sdk/resource now returns a partial result if there is a schema URL merge conflict.
Add exemplar support to go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc. (#4900)
Add exemplar support to go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp. (#4900)
The go.opentelemetry.io/otel/log module is added.
This module includes OpenTelemetry Go's implementation of the Logs Bridge API.
This module is in an alpha state, it is subject to breaking changes.
See our versioning policy for more info. (#4961)
Fixed
Fix registration of multiple callbacks when using the global meter provider from go.opentelemetry.io/otel. (#4945)
Fix negative buckets in output of exponential histograms. (#4956)
[1.23.1] 2024-02-07
Fixed
Register all callbacks passed during observable instrument creation instead of just the last one multiple times in go.opentelemetry.io/otel/sdk/metric. (#4888)
[1.23.0] 2024-02-06
This release contains the first stable, v1, release of the following modules:
See our versioning policy for more information about these stability guarantees.
Added
Add WithEndpointURL option to the exporters/otlp/otlpmetric/otlpmetricgrpc, exporters/otlp/otlpmetric/otlpmetrichttp, exporters/otlp/otlptrace/otlptracegrpc and exporters/otlp/otlptrace/otlptracehttp packages. (#4808)
Experimental exemplar exporting is added to the metric SDK.
See metric documentation for more information about this feature and how to enable it. (#4871)
ErrSchemaURLConflict is added to go.opentelemetry.io/otel/sdk/resource.
This error is returned when a merge of two Resources with different (non-empty) schema URL is attempted. (#4876)
Changed
The Merge and New functions in go.opentelemetry.io/otel/sdk/resource now returns a partial result if there is a schema URL merge conflict.
Bumps the go-modules group with 11 updates:
1.0.3
1.0.4
1.3.0
1.4.1
1.17.6
1.17.7
0.27.0
0.28.0
0.45.0
0.49.0
1.19.0
1.24.0
1.19.0
1.24.0
1.19.0
1.24.0
0.19.0
0.20.0
0.17.0
0.18.0
1.61.0
1.62.0
Updates
github.com/felixge/httpsnoop
from 1.0.3 to 1.0.4Release notes
Sourced from github.com/felixge/httpsnoop's releases.
Commits
c5817c2
codegen: fix generated header comment (#25)661666c
Support (ignore) 1xx status codes. (#24)8b7a371
tests: refactor benchmarks to remove test server overhead (#20)dcf093d
chore: switch to github actions (#21)Updates
github.com/go-logr/logr
from 1.3.0 to 1.4.1Release notes
Sourced from github.com/go-logr/logr's releases.
Commits
dcdc3f2
slogr: fix unintended API break in v0.8.0 (#253)5d88f52
funcr: Add LogInfoLevel Option to skip logging level in the info log (#240)177005d
build(deps): bump actions/upload-artifact from 3.1.3 to 4.0.0e7f489a
build(deps): bump github/codeql-action from 2.22.9 to 3.22.11cf56c3b
build(deps): bump actions/setup-go from 4 to 52ad296e
build(deps): bump github/codeql-action from 2.22.8 to 2.22.9d55b4e2
Merge pull request #241 from thockin/master98ee9d9
Clean up slog testing and restore coverageb228ba8
Break examples to new file6432877
Add benchmarks for slogSinkUpdates
github.com/klauspost/compress
from 1.17.6 to 1.17.7Release notes
Sourced from github.com/klauspost/compress's releases.
Commits
1e2b275
tests: Rename fuzz helpers back. (#931)68b7039
s2: Fix literal+repeat exceeds dst (#930)5895eb4
s2: Add AsyncFlush method: Complete the block without flushing (#927)4c49017
ci: Build with Go 1.22.x - deprecate 1.19 (#926)8e5ae40
Update README.mdUpdates
github.com/testcontainers/testcontainers-go
from 0.27.0 to 0.28.0Release notes
Sourced from github.com/testcontainers/testcontainers-go's releases.
... (truncated)
Commits
357cff8
chore: use new version (v0.28.0) in modules and examplesc906e65
chore: define proper execution order for container lifecycle hooks (#1922)50fc8e7
Added Consul module (#2194)1f628e2
fix: wait more time in test (#2211)4bf9515
chore(ci): do not fail fast main tests in different Go versions (#2210)48fc228
feat (postgres): support for creating and restoring Snapshots (#2199)54b1d8a
fix: apply volume options only to volumes (#2201)f012d34
redpanda/test: add admin client call (#2200)0e16af2
chore(deps): bump cloud.google.com/go/spanner from 1.55.0 to 1.56.0 in /modul...3562ef7
chore(deps): bump github.com/docker/docker from 25.0.1+incompatible to 25.0.2...Updates
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
from 0.45.0 to 0.49.0Release notes
Sourced from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp's releases.
... (truncated)
Changelog
Sourced from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp's changelog.
... (truncated)
Commits
e22317f
Release v1.24.0/v0.49.0/v0.18.0/v0.4.0 (#5141)b39c371
Add links checking actions (#5136)1dc457c
Fix broken link (#5135)65f3667
support exponential histograms in the prometheus bridge (#5093)c78da11
Add support for summary metrics in the prometheus bridge (#5089)dabfd13
fix httpconv changes in docs from semconv 1.17 to 1.20 (#4799)4e9ecc2
add package comment to otelgrpc/internal/test (#5085)72f859c
Support and test Go 1.22 (#5082)43ec73b
Use an atomic.Int64 as bodyWrapper read bytes counter (#5080)ee76330
fork a subset of google.golang.org/grpc/interop to otelgrpc (#4897)Updates
go.opentelemetry.io/otel
from 1.19.0 to 1.24.0Release notes
Sourced from go.opentelemetry.io/otel's releases.
Changelog
Sourced from go.opentelemetry.io/otel's changelog.
... (truncated)
Commits
e6e186b
Release v1.24.0/v0.46.0/v0.0.1-alpha (#4966)a5ec3fc
Add experimental-logs module set (#4961)27e495d
Fix output exponential histogram negative buckets (#4956)8df89f6
log: Remove Value.AsAny (#4963)7cc660f
log: Add allocation tests (#4957)6ea99af
log: Add benchmark tests (#4958)7b3382e
log: Implement Value and KeyValue types (#4949)f793a05
Fix registration of multiple callbacks when using the global meter provider (...c2fdbca
design: log value accessors must not panic (#4948)dd3b00f
Add thelog/noop
package (#4943)Updates
go.opentelemetry.io/otel/metric
from 1.19.0 to 1.24.0Release notes
Sourced from go.opentelemetry.io/otel/metric's releases.
Changelog
Sourced from go.opentelemetry.io/otel/metric's changelog.
... (truncated)
Commits
e6e186b
Release v1.24.0/v0.46.0/v0.0.1-alpha (#4966)a5ec3fc
Add experimental-logs module set (#4961)27e495d
Fix output exponential histogram negative buckets (#4956)8df89f6
log: Remove Value.AsAny (#4963)7cc660f
log: Add allocation tests (#4957)6ea99af
log: Add benchmark tests (#4958)7b3382e
log: Implement Value and KeyValue types (#4949)f793a05
Fix registration of multiple callbacks when using the global meter provider (...c2fdbca
design: log value accessors must not panic (#4948)dd3b00f
Add thelog/noop
package (#4943)Updates
go.opentelemetry.io/otel/trace
from 1.19.0 to 1.24.0Release notes
Sourced from go.opentelemetry.io/otel/trace's releases.
Changelog
Sourced from go.opentelemetry.io/otel/trace's changelog.
... (truncated)
Commits
e6e186b
Release v1.24.0/v0.46.0/v0.0.1-alpha (#4966)a5ec3fc
Add experimental-logs module set (#4961)27e495d
Fix output exponential histogram negative buckets (#4956)8df89f6
log: Remove Value.AsAny (#4963)7cc660f
log: Add allocation tests (#4957)6ea99af
log: Add benchmark tests (#4958)7b3382e
log: Implement Value and KeyValue types (#4949)f793a05
Fix registration of multiple callbacks when using the global meter provider (...c2fdbca
design: log value accessors must not panic (#4948)dd3b00f
Add thelog/noop
package (#4943)Updates
golang.org/x/crypto
from 0.19.0 to 0.20.0Commits
0aab8d0
all: update go.mod x/net dependency5bead59
ocsp: don't use iota for externally defined constants1a86580
x/crypto/internal/poly1305: improve sum_ppc64le.s1c981e6
ssh/test: don't use DSA keys in integrations tests, update test RSA key62c9f17
x509roots/nss: manually exclude a confusingly constrained rootUpdates
golang.org/x/tools
from 0.17.0 to 0.18.0Commits
c5643e9
gopls/internal/server: fix two bugs related to dynamic configuration50b4f1b
gopls/internal/golang: close open filef0ef3c6
gopls: update x/telemetry dependency to fix crash8cf0a8e
gopls: record that v0.15 will be the last to support go1.18730dc3c
gopls/internal/settings: add a hidden option to disable zero config95f04f4
gopls/internal/golang: add resolve support for inline refactorings9619683
gopls/internal/cache: treat local replaces as workspace modulesa5af84e
gopls/internal/cache: check views on any on-disk change to go.mod filesa7407fa
gopls: update telemetry314368d
go/analysis/passes/deepequalerrors: audit for types.Alias safetyUpdates
google.golang.org/grpc
from 1.61.0 to 1.62.0Release notes
Sourced from google.golang.org/grpc's releases.