mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-04-15 11:36:44 +02:00
Applying attribute limits in `Record` uses value receiver. But it should add count of dropped attrs. In this PR I add using of pointer receiver. Also it's slightly faster with pointer receiver: ``` goos: darwin goarch: arm64 pkg: go.opentelemetry.io/otel/sdk/log │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ SetAddAttributes-10 175.7n ± 3% 159.8n ± 4% -9.08% (p=0.000 n=10) │ old.txt │ new.txt │ │ B/op │ B/op vs base │ SetAddAttributes-10 48.00 ± 0% 48.00 ± 0% ~ (p=1.000 n=10) ¹ ¹ all samples are equal │ old.txt │ new.txt │ │ allocs/op │ allocs/op vs base │ SetAddAttributes-10 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹ ¹ all samples are equal ```