Visitar URL original
log: use attribute values for records by pellared · Pull Request #8490 · open-telemetry/opentelemetry-go · GitHub
Skip to content

log: use attribute values for records - #8490

Merged
pellared merged 8 commits into
open-telemetry:mainfrom
pellared:logs-attr
Jun 23, 2026
Merged

pellared merged 8 commits into
open-telemetry:mainfrom
pellared:logs-attr

Conversation

@pellared

@pellared pellared commented Jun 19, 2026 •

Copy link
Copy Markdown
Member

Fixes #7034.

  • Remove the log-specific Kind, Value, KeyValue, value constructors, and attribute conversion helpers from go.opentelemetry.io/otel/log.
  • Use attribute.Value and attribute.KeyValue for log bodies and attributes across go.opentelemetry.io/otel/log, go.opentelemetry.io/otel/log/logtest, go.opentelemetry.io/otel/sdk/log, and go.opentelemetry.io/otel/sdk/log/logtest.
  • Update OTLP log transform templates/generated code and stdout log JSON encoding to marshal attribute.Value directly.
  • Preserve SDK duplicate-key, WithAllowKeyDuplication, nested-map deduplication, recursive attribute value truncation, and zero-body semantics.
  • Refactor internal attrdedup helpers to return whether normalization changed the input instead of adding parallel *Changed helper functions.
  • Update examples, design docs, changelog entries, and log benchmarks for the attribute-backed API.

Benchmarks

Logs API benchmarks

go test -run '^$' -bench '^(BenchmarkRecord|BenchmarkNewLoggerConfig)$' -benchmem -count=10 .
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/log
cpu: 13th Gen Intel(R) Core(TM) i7-13800H
                                                      │ /tmp/bench-log-main.txt │       /tmp/bench-log-branch.txt        │
                                                      │         sec/op          │    sec/op      vs base                 │
NewLoggerConfig/with_no_options-20                                 14.32n ±  0%    14.43n ±  1%    +0.77% (p=0.000 n=10)
NewLoggerConfig/with_an_instrumentation_version-20                 39.92n ±  0%    39.93n ±  1%         ~ (p=0.696 n=10)
NewLoggerConfig/with_a_schema_url-20                               39.50n ±  1%    39.46n ±  0%         ~ (p=0.099 n=10)
NewLoggerConfig/with_instrumentation_attribute-20                  40.32n ±  0%    40.37n ±  2%         ~ (p=0.838 n=10)
NewLoggerConfig/with_instrumentation_attribute_set-20              40.39n ±  1%    40.32n ±  0%    -0.17% (p=0.019 n=10)
Record/Timestamp-20                                               0.5987n ±  9%   0.5882n ±  5%         ~ (p=0.138 n=10)
Record/ObservedTimestamp-20                                       0.6193n ±  2%   0.6125n ±  7%         ~ (p=0.739 n=10)
Record/Severity-20                                                0.2868n ±  4%   0.3841n ± 14%   +33.97% (p=0.000 n=10)
Record/SeverityText-20                                            0.5615n ±  9%   0.5306n ±  1%         ~ (p=0.481 n=10)
Record/Body-20                                                    0.4146n ±  8%   2.5160n ±  0%  +506.85% (p=0.000 n=10)
Record/Attributes/5-20                                             72.38n ±  0%    60.55n ±  4%   -16.34% (p=0.000 n=10)
Record/Attributes/10-20                                            405.0n ± 21%    574.9n ± 10%   +41.95% (p=0.000 n=10)
geomean                                                            7.393n          8.872n         +20.00%

                                                      │ /tmp/bench-log-main.txt │      /tmp/bench-log-branch.txt       │
                                                      │          B/op           │    B/op     vs base                  │
NewLoggerConfig/with_no_options-20                                 0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=10) ¹
NewLoggerConfig/with_an_instrumentation_version-20                 0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=10) ¹
NewLoggerConfig/with_a_schema_url-20                               0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=10) ¹
NewLoggerConfig/with_instrumentation_attribute-20                  0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=10) ¹
NewLoggerConfig/with_instrumentation_attribute_set-20              0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=10) ¹
Record/Timestamp-20                                                0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=10) ¹
Record/ObservedTimestamp-20                                        0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=10) ¹
Record/Severity-20                                                 0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=10) ¹
Record/SeverityText-20                                             0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=10) ¹
Record/Body-20                                                     0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=10) ¹
Record/Attributes/5-20                                             0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=10) ¹
Record/Attributes/10-20                                            208.0 ± 0%     320.0 ± 0%  +53.85% (p=0.000 n=10)
geomean                                                                       ²                +3.66%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                                      │ /tmp/bench-log-main.txt │      /tmp/bench-log-branch.txt      │
                                                      │        allocs/op        │ allocs/op   vs base                 │
NewLoggerConfig/with_no_options-20                                 0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=10) ¹
NewLoggerConfig/with_an_instrumentation_version-20                 0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=10) ¹
NewLoggerConfig/with_a_schema_url-20                               0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=10) ¹
NewLoggerConfig/with_instrumentation_attribute-20                  0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=10) ¹
NewLoggerConfig/with_instrumentation_attribute_set-20              0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=10) ¹
Record/Timestamp-20                                                0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=10) ¹
Record/ObservedTimestamp-20                                        0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=10) ¹
Record/Severity-20                                                 0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=10) ¹
Record/SeverityText-20                                             0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=10) ¹
Record/Body-20                                                     0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=10) ¹
Record/Attributes/5-20                                             0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=10) ¹
Record/Attributes/10-20                                            1.000 ± 0%     1.000 ± 0%       ~ (p=1.000 n=10) ¹
geomean                                                                       ²               +0.00%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

Allocation counts were unchanged.

The large Record/Body percentage is an artifact of comparing against a sub-nanosecond baseline: the benchmark increased from 0.4146 ns/op to 2.5160 ns/op, so the absolute change is about 2.1 ns/op. This path only stores and reads an attribute.BoolValue(true); it does not normalize, allocate, or walk nested values. The extra time comes from using attribute.Value as the record body. On amd64 it is wider than the removed log-specific Value, so var r log.Record, SetBody, and Body move/zero more bytes even for a simple boolean body. The B/op and allocs/op tables stay at zero for this benchmark.

SDK log benchmarks use selected body and attribute normalization paths with a short benchmark window to keep the repeated comparison stable in this environment:

go test -run '^$' -bench '^BenchmarkLoggerProviderLogger$' -benchmem -benchtime=100ms -count=10 .
go test -run '^$' -bench '^BenchmarkSetAttributes$/^(Unique|NestedDeduplication)$/^(NoLimits|Enabled|Disabled)$' -benchmem -benchtime=100ms -count=10 .
go test -run '^$' -bench '^BenchmarkSetBody$/^(Simple|Deduplication|NestedDeduplication)$/^(NoLimits|Enabled|Disabled)$' -benchmem -benchtime=100ms -count=10 .
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/sdk/log
cpu: 13th Gen Intel(R) Core(TM) i7-13800H
                                              │ /tmp/bench-sdk-log-main.txt │     /tmp/bench-sdk-log-branch.txt      │
                                              │           sec/op            │    sec/op      vs base                 │
LoggerProviderLogger-20                                        498.6n ±  9%    499.7n ± 12%         ~ (p=0.579 n=10)
SetAttributes/Unique/NoLimits-20                               229.7n ±  2%    407.3n ±  4%   +77.34% (p=0.000 n=10)
SetAttributes/NestedDeduplication/Enabled-20                   762.8n ±  1%   1365.5n ±  6%   +79.02% (p=0.000 n=10)
SetAttributes/NestedDeduplication/Disabled-20                  132.7n ± 10%    146.5n ± 19%         ~ (p=0.288 n=10)
SetBody/Simple/NoLimits-20                                     17.58n ±  2%    28.23n ±  0%   +60.55% (p=0.000 n=10)
SetBody/Deduplication/Enabled-20                               172.2n ±  1%    352.6n ± 10%  +104.85% (p=0.000 n=10)
SetBody/Deduplication/Disabled-20                              16.05n ±  2%    21.91n ± 23%   +36.58% (p=0.000 n=10)
SetBody/NestedDeduplication/Enabled-20                         530.7n ±  9%    747.6n ±  6%   +40.88% (p=0.000 n=10)
SetBody/NestedDeduplication/Disabled-20                        16.10n ±  1%    21.77n ± 22%   +35.25% (p=0.000 n=10)
geomean                                                        119.1n          173.8n         +45.97%

                                              │ /tmp/bench-sdk-log-main.txt │      /tmp/bench-sdk-log-branch.txt      │
                                              │            B/op             │     B/op      vs base                   │
LoggerProviderLogger-20                                       380.0 ± 18%      399.0 ± 19%         ~ (p=0.469 n=10)
SetAttributes/Unique/NoLimits-20                              0.000 ±  0%      0.000 ±  0%         ~ (p=1.000 n=10) ¹
SetAttributes/NestedDeduplication/Enabled-20                  312.0 ±  0%     1248.0 ±  0%  +300.00% (p=0.000 n=10)
SetAttributes/NestedDeduplication/Disabled-20                 0.000 ±  0%      0.000 ±  0%         ~ (p=1.000 n=10) ¹
SetBody/Simple/NoLimits-20                                    0.000 ±  0%      0.000 ±  0%         ~ (p=1.000 n=10) ¹
SetBody/Deduplication/Enabled-20                              128.0 ±  0%      512.0 ±  0%  +300.00% (p=0.000 n=10)
SetBody/Deduplication/Disabled-20                             0.000 ±  0%      0.000 ±  0%         ~ (p=1.000 n=10) ¹
SetBody/NestedDeduplication/Enabled-20                        280.0 ±  0%      992.0 ±  0%  +254.29% (p=0.000 n=10)
SetBody/NestedDeduplication/Disabled-20                       0.000 ±  0%      0.000 ±  0%         ~ (p=1.000 n=10) ¹
geomean                                                                   ²                  +57.47%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                              │ /tmp/bench-sdk-log-main.txt │     /tmp/bench-sdk-log-branch.txt      │
                                              │          allocs/op          │  allocs/op   vs base                   │
LoggerProviderLogger-20                                        1.000 ± 0%      1.000 ± 0%         ~ (p=1.000 n=10) ¹
SetAttributes/Unique/NoLimits-20                               0.000 ± 0%      0.000 ± 0%         ~ (p=1.000 n=10) ¹
SetAttributes/NestedDeduplication/Enabled-20                   5.000 ± 0%     10.000 ± 0%  +100.00% (p=0.000 n=10)
SetAttributes/NestedDeduplication/Disabled-20                  0.000 ± 0%      0.000 ± 0%         ~ (p=1.000 n=10) ¹
SetBody/Simple/NoLimits-20                                     0.000 ± 0%      0.000 ± 0%         ~ (p=1.000 n=10) ¹
SetBody/Deduplication/Enabled-20                               1.000 ± 0%      2.000 ± 0%  +100.00% (p=0.000 n=10)
SetBody/Deduplication/Disabled-20                              0.000 ± 0%      0.000 ± 0%         ~ (p=1.000 n=10) ¹
SetBody/NestedDeduplication/Enabled-20                         4.000 ± 0%      8.000 ± 0%  +100.00% (p=0.000 n=10)
SetBody/NestedDeduplication/Disabled-20                        0.000 ± 0%      0.000 ± 0%         ~ (p=1.000 n=10) ¹
geomean                                                                   ²                 +25.99%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

Normalization here means recursively applying the SDK's canonical log-record rules to attribute values before export: duplicate keys inside attribute.MAP values are removed with last-value-wins semantics, nested MAP/SLICE values are normalized the same way, and attribute value length limits are applied to string-like values inside attributes.

The duplicate-key and nested-map SDK paths are slower because normalization now walks generic attribute.Value MAP/SLICE trees and rebuilds changed subtrees with attribute.MapValue/attribute.SliceValue. The no-op and WithAllowKeyDuplication paths still avoid allocations, but duplicate or nested changes require new value/key-value slices.

@codecov

codecov Bot commented Jun 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.9%. Comparing base (7aa413f) to head (3df453e).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #8490     +/-   ##
=======================================
- Coverage   84.1%   83.9%   -0.3%     
=======================================
  Files        325     323      -2     
  Lines      26194   25739    -455     
=======================================
- Hits       22041   21605    -436     
+ Misses      3771    3756     -15     
+ Partials     382     378      -4     
Files with missing lines Coverage Δ
...otlp/otlplog/otlploggrpc/internal/transform/log.go 97.7% <100.0%> (+1.4%) ⬆️
...otlp/otlplog/otlploghttp/internal/transform/log.go 97.7% <100.0%> (+1.4%) ⬆️
exporters/stdout/stdoutlog/record.go 100.0% <100.0%> (+3.0%) ⬆️
log/logtest/assert.go 100.0% <100.0%> (ø)
log/logtest/recorder.go 100.0% <100.0%> (ø)
log/record.go 100.0% <100.0%> (ø)
sdk/internal/attrdedup/dedup.go 100.0% <100.0%> (ø)
sdk/log/internal/attrdedup/dedup.go 100.0% <100.0%> (ø)
sdk/log/logger.go 100.0% <100.0%> (ø)
sdk/log/logtest/factory.go 100.0% <ø> (ø)
... and 8 more

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request aligns the Logs API and SDK with the shared go.opentelemetry.io/otel/attribute value model by removing log-specific structured value types and using attribute.Value / attribute.KeyValue for log bodies and attributes across the API, SDK, test helpers, and OTLP/stdout exporters.

Changes:

  • Replace log-specific Kind/Value/KeyValue with attribute.Value/attribute.KeyValue throughout log API, SDK, logtest helpers, and exporters.
  • Refactor attrdedup helpers (SDK + templates) to return (value, changed) and update call sites accordingly.
  • Update docs, examples, and changelog entries to reflect the new attribute-backed logging model.

Reviewed changes

Copilot reviewed 50 out of 57 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sdk/trace/span.go Adapt attrdedup call signature
sdk/trace/provider.go Adapt attrdedup.Set signature
sdk/resource/resource.go Adapt attrdedup.KeyValues signature
sdk/metric/provider.go Adapt attrdedup.Set signature
sdk/metric/internal/attrdedup/dedup.go Return “changed” from helpers
sdk/metric/internal/attrdedup/dedup_test.go Test “changed” results
sdk/metric/instrument.go Adapt attrdedup signatures
sdk/log/ring_test.go Use attribute.Value body type
sdk/log/record.go Use attribute.Value/KeyValue + normalization
sdk/log/provider.go Adapt attrdedup.Set signature
sdk/log/logtest/factory.go Factory uses attribute types
sdk/log/logtest/factory_test.go Update tests to attribute types
sdk/log/logtest/example_test.go Update example to attribute.Value
sdk/log/logger.go Switch exception attrs to attribute.Key
sdk/log/logger_test.go Update tests to attribute values
sdk/log/logger_bench_test.go Update benches to attribute values
sdk/log/internal/attrdedup/dedup.go Return “changed” from helpers
sdk/log/internal/attrdedup/dedup_test.go Test “changed” results
sdk/log/exporter_test.go Update record bodies to attribute.Value
sdk/log/example_test.go Update processors to attribute types
sdk/log/DESIGN.md Document attribute-backed SDK record model
sdk/log/bench_test.go Update benchmarks to attribute types
sdk/log/batch_test.go Update tests/bench to attribute.Value
sdk/internal/attrdedup/dedup.go Return “changed” from helpers
sdk/internal/attrdedup/dedup_test.go Test “changed” results
sdk/internal/attrdedup/dedup_benchmark_test.go Adapt benchmark call signature
log/record.go API record uses attribute.Value/KeyValue
log/record_test.go Update tests to attribute types
log/record_bench_test.go Update benches to attribute types
log/logtest/recorder.go Recorder stores attribute types
log/logtest/recorder_test.go Update tests to attribute types
log/logtest/go.sum Module dependency updates
log/logtest/go.mod Module dependency updates
log/logtest/example_test.go Update example to attribute types
log/logtest/assert.go Compare attribute.Value in assertions
log/logtest/assert_test.go Update assertion tests to attribute types
log/kind_string.go Removed (obsolete log.Kind)
log/keyvalue.go Removed (obsolete log.Value/KeyValue)
log/keyvalue_test.go Removed (obsolete log.Value/KeyValue tests)
log/keyvalue_bench_test.go Removed (obsolete log.Value/KeyValue benches)
log/DESIGN.md Update design doc to attribute types
internal/shared/otlp/otlplog/transform/log.go.tmpl Use Attr/AttrValue for logs
internal/shared/otlp/otlplog/transform/log_test.go.tmpl Update templates to attribute types
internal/shared/otlp/otlplog/transform/log_attr_test.go.tmpl Update attr tests to attribute types
internal/shared/attrdedup/dedup.go.tmpl Template: return “changed”
internal/shared/attrdedup/dedup_test.go.tmpl Template tests for “changed”
exporters/stdout/stdoutlog/record.go Marshal attribute.Value directly
exporters/stdout/stdoutlog/exporter_test.go Update stdoutlog tests for attribute
exporters/otlp/otlplog/otlploghttp/internal/transform/log.go Use Attr/AttrValue for logs
exporters/otlp/otlplog/otlploghttp/internal/transform/log_test.go Update tests to attribute types
exporters/otlp/otlplog/otlploghttp/internal/transform/log_attr_test.go Update attr tests to attribute types
exporters/otlp/otlplog/otlploggrpc/internal/transform/log.go Use Attr/AttrValue for logs
exporters/otlp/otlplog/otlploggrpc/internal/transform/log_test.go Update tests to attribute types
exporters/otlp/otlplog/otlploggrpc/internal/transform/log_attr_test.go Update attr tests to attribute types
exporters/otlp/otlplog/otlploggrpc/exporter_test.go Update exporter tests to attribute
CHANGELOG.md Document breaking removals/changes
Files not reviewed (6)
  • exporters/otlp/otlplog/otlploggrpc/internal/transform/log.go: Generated file
  • exporters/otlp/otlplog/otlploggrpc/internal/transform/log_attr_test.go: Generated file
  • exporters/otlp/otlplog/otlploggrpc/internal/transform/log_test.go: Generated file
  • exporters/otlp/otlplog/otlploghttp/internal/transform/log.go: Generated file
  • exporters/otlp/otlplog/otlploghttp/internal/transform/log_attr_test.go: Generated file
  • exporters/otlp/otlplog/otlploghttp/internal/transform/log_test.go: Generated file

Comment thread sdk/log/record.go Resolved
Comment thread exporters/stdout/stdoutlog/record.go Resolved
@pellared
pellared marked this pull request as ready for review June 19, 2026 12:06
Comment thread exporters/stdout/stdoutlog/record.go Resolved
@pellared
pellared marked this pull request as draft June 19, 2026 12:38
@pellared
pellared marked this pull request as ready for review June 19, 2026 18:32
@pellared
pellared requested a review from Copilot June 19, 2026 19:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 50 out of 57 changed files in this pull request and generated 1 comment.

Files not reviewed (6)
  • exporters/otlp/otlplog/otlploggrpc/internal/transform/log.go: Generated file
  • exporters/otlp/otlplog/otlploggrpc/internal/transform/log_attr_test.go: Generated file
  • exporters/otlp/otlplog/otlploggrpc/internal/transform/log_test.go: Generated file
  • exporters/otlp/otlplog/otlploghttp/internal/transform/log.go: Generated file
  • exporters/otlp/otlplog/otlploghttp/internal/transform/log_attr_test.go: Generated file
  • exporters/otlp/otlplog/otlploghttp/internal/transform/log_test.go: Generated file

Comment thread sdk/log/DESIGN.md Resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@MrAlias MrAlias left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@XSAM XSAM left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@pellared
pellared merged commit 65f30a1 into open-telemetry:main Jun 23, 2026
33 checks passed
@pellared
pellared deleted the logs-attr branch June 23, 2026 11:24
@claude claude Bot mentioned this pull request Aug 26, 2026
1 task
teemow added a commit to teemow/kagent that referenced this pull request Sep 16, 2026
ADK v2.3.0 ships native context compaction (session/compaction: sliding
window, tail retention, LLM summarizer) and the runner hook that applies
it. The OpenTelemetry exporters and contrib instrumentation move to the
matching v1.45.0 / v0.21.0 / v0.70.0 set, which the new ADK version
already requires for otel/log.

otel/log v0.21.0 hands log bodies and attributes as attribute.Value and
attribute.KeyValue and drops its own Value type (open-telemetry/opentelemetry-go#8490);
the telemetry test builds its record body with attribute.StringValue accordingly.

Signed-off-by: Timo Derstappen <teemow@gmail.com>
teemow added a commit to teemow/kagent that referenced this pull request Sep 16, 2026
ADK v2.3.0 ships native context compaction (session/compaction: sliding
window, tail retention, LLM summarizer) and the runner hook that applies
it. The OpenTelemetry exporters and contrib instrumentation move to the
matching v1.45.0 / v0.21.0 / v0.70.0 set, which the new ADK version
already requires for otel/log.

otel/log v0.21.0 hands log bodies and attributes as attribute.Value and
attribute.KeyValue and drops its own Value type (open-telemetry/opentelemetry-go#8490);
the telemetry test builds its record body with attribute.StringValue accordingly.

Signed-off-by: Timo Derstappen <teemow@gmail.com>
teemow added a commit to teemow/kagent that referenced this pull request Sep 16, 2026
ADK v2.3.0 ships native context compaction (session/compaction: sliding
window, tail retention, LLM summarizer) and the runner hook that applies
it. The OpenTelemetry exporters and contrib instrumentation move to the
matching v1.45.0 / v0.21.0 / v0.70.0 set, which the new ADK version
already requires for otel/log.

otel/log v0.21.0 hands log bodies and attributes as attribute.Value and
attribute.KeyValue and drops its own Value type (open-telemetry/opentelemetry-go#8490);
the telemetry test builds its record body with attribute.StringValue accordingly.

Signed-off-by: Timo Derstappen <teemow@gmail.com>
nisargabd added a commit to OpenAgriNet/network-adapter that referenced this pull request Sep 18, 2026
CVE-2026-81871 (otlploggrpc v0.19.0, MEDIUM) and CVE-2026-81870
(otlptrace, otlptracegrpc, otel/sdk, LOW) were failing trivy-gate on
every PR. Bumps the whole otel release train together -- v1.45.0 for the
stable line, v0.21.0 for the log line -- rather than only the four
flagged modules, because the two lines are released in lockstep.

otel/log v0.21.0 drops its own Value/KeyValue types in favour of the
shared go.opentelemetry.io/otel/attribute ones (upstream
open-telemetry/opentelemetry-go#8490), so the audit-log call sites move
to attribute.String/StringValue/KeyValue. Same keys, same values, same
OTLP output -- no behaviour change.

A narrower bump is not possible: otlploggrpc v0.21.0 requires otel/log
v0.21.0, so module resolution pulls the new API in regardless.

stdHandler.go also picks up a gofmt pass: it was already unformatted on
development, and the pre-commit hook checks any file the commit touches.
Whitespace only, no logic in those lines.
teemow added a commit to teemow/kagent that referenced this pull request Sep 20, 2026
ADK v2.3.0 ships native context compaction (session/compaction: sliding
window, tail retention, LLM summarizer) and the runner hook that applies
it. The OpenTelemetry exporters and contrib instrumentation move to the
matching v1.45.0 / v0.21.0 / v0.70.0 set, which the new ADK version
already requires for otel/log.

otel/log v0.21.0 hands log bodies and attributes as attribute.Value and
attribute.KeyValue and drops its own Value type (open-telemetry/opentelemetry-go#8490);
the telemetry test builds its record body with attribute.StringValue accordingly.

Signed-off-by: Timo Derstappen <teemow@gmail.com>
AmyDe added a commit to AmyDe/town-crier that referenced this pull request Sep 20, 2026
…-1hn5n)

otel/log v0.21.0 removed log.Value, log.KeyValue and their constructors
(open-telemetry/opentelemetry-go#8490), so the pinned otelslog bridge
v0.19.0 no longer compiles against it. otelslog v0.20.0 is the release
built for otel/log v0.21.0 and otel v1.45.0, which is exactly the set
this Dependabot bump moves to.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0118hH166dW23tXjqiu2Kb8v
rita7lopes added a commit to metrico/otel-collector that referenced this pull request Sep 22, 2026
otel/log v0.21.0 removes Kind, Value and KeyValue in favour of
attribute.Value (open-telemetry/opentelemetry-go#8490), so every module
that consumes that API has to move in the same commit. Bumping
otlploggrpc on its own (#172) pulled otel/log to v0.21.0 through MVS
while leaving otlploghttp, stdoutlog and the otelzap bridge on the
removed API, which broke the build of cmd/otel-collector.

Moved as one set:
  otel/log                  v0.20.0 -> v0.21.0
  otel/sdk/log              v0.20.0 -> v0.21.0
  otlplog/otlploggrpc       v0.20.0 -> v0.21.0
  otlplog/otlploghttp       v0.20.0 -> v0.21.0
  stdout/stdoutlog          v0.20.0 -> v0.21.0
  contrib/bridges/otelzap   v0.19.0 -> v0.20.0

otelzap v0.20.0 is the release that requires otel/log v0.21.0; v0.19.0
caps at v0.20.0 and v0.20.1 already requires v0.22.0. Staying on the
v0.21.0 set keeps the otel core at v1.45.0, so this change touches the
log family only.
rorua added a commit to alifcapital/otelemetry that referenced this pull request Sep 23, 2026
…able deps

Upgrade OpenTelemetry to v1.46.0 (logs v0.22.0) and pick up security
fixes in grpc v1.84.0, x/crypto v0.57.0, x/net v0.59.0, x/text v0.42.0
and klauspost/compress v1.20.0.

otel/log v0.21.0 removed log.KeyValue/log.Value in favor of
attribute.KeyValue/attribute.Value (open-telemetry/opentelemetry-go#8490),
so the Log interface and LogAttribute now use attribute.KeyValue.

BREAKING CHANGE: Log.Debug/Info/Warning/Error/Fatal take
...attribute.KeyValue and LogAttribute returns attribute.KeyValue.
See MIGRATION.md.
rorua added a commit to alifcapital/otelemetry that referenced this pull request Sep 23, 2026
…able deps (#4)

Upgrade OpenTelemetry to v1.46.0 (logs v0.22.0) and pick up security
fixes in grpc v1.84.0, x/crypto v0.57.0, x/net v0.59.0, x/text v0.42.0
and klauspost/compress v1.20.0.

otel/log v0.21.0 removed log.KeyValue/log.Value in favor of
attribute.KeyValue/attribute.Value (open-telemetry/opentelemetry-go#8490),
so the Log interface and LogAttribute now use attribute.KeyValue.

BREAKING CHANGE: Log.Debug/Info/Warning/Error/Fatal take
...attribute.KeyValue and LogAttribute returns attribute.KeyValue.
See MIGRATION.md.
kelvinprabhu pushed a commit to OpenAgriNet/network-adapter that referenced this pull request Sep 30, 2026
CVE-2026-81871 (otlploggrpc v0.19.0, MEDIUM) and CVE-2026-81870
(otlptrace, otlptracegrpc, otel/sdk, LOW) were failing trivy-gate on
every PR. Bumps the whole otel release train together -- v1.45.0 for the
stable line, v0.21.0 for the log line -- rather than only the four
flagged modules, because the two lines are released in lockstep.

otel/log v0.21.0 drops its own Value/KeyValue types in favour of the
shared go.opentelemetry.io/otel/attribute ones (upstream
open-telemetry/opentelemetry-go#8490), so the audit-log call sites move
to attribute.String/StringValue/KeyValue. Same keys, same values, same
OTLP output -- no behaviour change.

A narrower bump is not possible: otlploggrpc v0.21.0 requires otel/log
v0.21.0, so module resolution pulls the new API in regardless.

stdHandler.go also picks up a gofmt pass: it was already unformatted on
development, and the pre-commit hook checks any file the commit touches.
Whitespace only, no logic in those lines.
frenchfrywpepper added a commit to redpanda-data/common-go that referenced this pull request Oct 19, 2026
go.opentelemetry.io/otel/sdk/log below v0.21.0 is affected by
CVE-2026-81872 (Allocation of Resources Without Limits or Throttling).
Consumers such as cloudv2 cannot upgrade past it while this module
pins otel/log v0.19.0, because v0.21.0 does not compile against the
current log transform.

otel v1.45.0 replaced log.Value/log.KeyValue with attribute.Value and
attribute.KeyValue for log bodies and attributes (open-telemetry/opentelemetry-go#8490).
Log attributes now go through attributeValueToProto, which gains the
EMPTY, BYTESLICE, SLICE and MAP cases the log-specific converter used to
handle. Spans, resources and metrics get the same encoding for those
attribute types, which are new in otel v1.45.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
timothybrush pushed a commit to timothybrush/gastown that referenced this pull request Oct 24, 2026
… advisories

Fixes open Dependabot alerts on go.mod:
- google.golang.org/grpc 1.80.0 -> 1.83.2 (GHSA-hrxh-6v49-42gf,
  GHSA-vp52-pcj8-j9qc, GHSA-2v4p-qf9q-27wj, GHSA-qc2q-p7wx-3px3; 1.83.2
  also clears GO-2026-6443)
- github.com/apache/thrift 0.23.0 -> 0.24.0 (GHSA-8wv5-x4w7-5gww)
- github.com/moby/go-archive 0.2.0 -> 0.3.0 (GHSA-hfg8-hc9c-6c3h)
- go.opentelemetry.io/otel/sdk 1.43.0 -> 1.45.0 (GHSA-8wmf-6v46-5gfg)
- go.opentelemetry.io/otel/sdk/log 0.19.0 -> 0.21.0 (GHSA-hjf4-fphr-2h65)

The rest of the OTel family moves with it (1.45.0 / 0.21.0) so the
modules stay in lockstep. golang.org/x/net goes to 0.60.0 to clear
GO-2026-6603/6610/6611/6612/6617, which govulncheck reports as reachable
from cmd/gt.

otel/log 0.21.0 removed its own KeyValue/Value types in favor of
go.opentelemetry.io/otel/attribute (open-telemetry/opentelemetry-go#8490),
so internal/telemetry now builds log attributes with attribute.String,
attribute.Int64 and friends. Behavior is unchanged. gofmt also realigns a
var block in recorder.go that was already misformatted on main.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

Logs to reuse attribute.[Key]Value and remove log.[Key]Value types

4 participants