You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-03 18:35:08 +02:00
1a877475b7
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/7954 Apply the SDK attribute value limit to the new BYTESLICE attribute type. The limiter has been implemented for trace and log attributes, ensuring values are truncated according to the configured attribute size limit (counting each byte as 1). ``` goos: darwin goarch: arm64 pkg: go.opentelemetry.io/otel/sdk/trace cpu: Apple M1 BenchmarkSpanLimits/None-8 275883 4062 ns/op 12448 B/op 38 allocs/op BenchmarkSpanLimits/AttributeValueLengthLimit-8 266834 4407 ns/op 13012 B/op 47 allocs/op BenchmarkSpanLimits/AttributeCountLimit-8 299941 4025 ns/op 11616 B/op 38 allocs/op BenchmarkSpanLimits/EventCountLimit-8 305880 3795 ns/op 11376 B/op 35 allocs/op BenchmarkSpanLimits/LinkCountLimit-8 314924 4375 ns/op 10976 B/op 35 allocs/op BenchmarkSpanLimits/AttributePerEventCountLimit-8 275667 4125 ns/op 12448 B/op 38 allocs/op BenchmarkSpanLimits/AttributePerLinkCountLimit-8 285484 4022 ns/op 12448 B/op 38 allocs/op PASS ok go.opentelemetry.io/otel/sdk/trace 9.394s ``` --------- Co-authored-by: Robert Pająk <pellared@hotmail.com>