Skip to content

fix(otel): build against OpenTelemetry v1.45 and otel/log v0.21 - #68

Merged
jasoet merged 1 commit into
release/v2from
fix/v2-otel-log-attribute-api
Oct 5, 2026
Merged

jasoet merged 1 commit into
release/v2from
fix/v2-otel-log-attribute-api

Conversation

@jasoet

@jasoet jasoet commented Oct 5, 2026

Copy link
Copy Markdown
Owner

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.

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
jasoet merged commit 2f58627 into release/v2 Oct 5, 2026
@jasoet
jasoet deleted the fix/v2-otel-log-attribute-api branch October 5, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant