Repository navigation
fix(otel): build against OpenTelemetry v1.45 and otel/log v0.21 - #67
Merged
Merged
Conversation
otel/log v0.21 dropped its own KeyValue and Value types for attribute.KeyValue and attribute.Value, so the otel, grpc and rest packages stopped compiling for any consumer that raised otel/sdk/log to the release fixing GO-2026-6615.
jasoet
added a commit
that referenced
this pull request
Oct 5, 2026
Backport of #67 to the frozen v2 line, as an emergency patch. ## Why `go.opentelemetry.io/otel/log` v0.21.0 replaced `log.KeyValue` / `log.Value` with `attribute.KeyValue` / `attribute.Value`. v2.13.1 uses the old API, so any build that also contains `otel/sdk/log` v0.21.0 — the release fixing GO-2026-6615 — fails to compile `pkg/v2/otel`. Consumers still reach v2 through `go-wf/v2`. ## What - Raise `otel`, `otel/sdk`, `otel/metric`, `otel/trace`, `otel/sdk/metric` to v1.45.0 and `otel/log`, `otel/sdk/log`, `otlploghttp` to v0.21.0. - Port log record attributes and bodies in `otel`, `grpc`, `rest` and the otel logging example to the `attribute` package. No exported signature changes. - The console exporter renders slice and map attributes through `attribute.Value.AsInterface()`. - `golang.org/x/net` rises to v0.57.0, which deprecates `http2/h2c`; `grpc/server.go` keeps it under `//nolint:staticcheck`. ## Release This branch has no automated release; tag `v2.13.2` by hand after merging. ## Verification `task ci:check` passes locally (unit tests with race detector, lint). `go vet` over the tagged examples reports only findings that predate this change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
go.opentelemetry.io/otel/logv0.21.0 removedlog.KeyValue,log.Valueand their constructors (log.String,log.StringValue, …) in favour ofattribute.KeyValue/attribute.Value. Every release up to v3.0.0 uses the old API, so a consumer that raisesotel/sdk/logto v0.21.0 — the release fixing GO-2026-6615 (BatchProcessor busy-spin when the export buffer is full) — can no longer compileotel,grpcorrest.What
otel,otel/sdk,otel/metric,otel/trace,otel/sdk/metricto v1.45.0 andotel/log,otel/sdk/log,otlploghttpto v0.21.0. This also clears GO-2026-6505 (otel/sdk).otel,grpcandrestto theattributepackage. No exported signature changes.attribute.Value.AsInterface()(plain Go values) instead of the oldlog.Valuestructs.golang.org/x/netto v0.57.0, which deprecateshttp2/h2c.grpc/server.gokeeps it under//nolint:staticcheck:http.Server.Protocolsdrops the HTTP/1.1Upgrade: h2cpath, so replacing it is a behaviour change for its own PR.Not in this PR
govulncheckstill reports advisories unrelated to OpenTelemetry (grpc v1.83.0, x/crypto v0.54.0, moby/go-archive, argo-workflows, Go stdlib 1.26.1).Verification
task ci:check,go vet -tags='example integration argo' ./...andtask test:integrationall pass locally.