mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-01-26 03:52:03 +02:00
64416533d5
Good day, Thanks for review this PR! This PR follows from https://github.com/open-telemetry/opentelemetry-go/pull/5864 and avoid multiple locks in `End`, `RecordError`, `AddEvent` and `AddLink`. Benchstats result are: ``` goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/sdk/trace cpu: 11th Gen Intel(R) Core(TM) i5-11400H @ 2.70GHz │ event-3cbd9671.txt │ event-pr-e9744b48.txt │ │ sec/op │ │ SpanEnd-12 63.07n ± 1% 53.63n ± 1% -14.97% (p=0.000 n=10) │ event-3cbd9671.txt │ event-pr-e9744b48.txt │ │ B/op │ B/op vs base │ SpanEnd-12 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ ¹ all samples are equal │ event-3cbd9671.txt │ event-pr-e9744b48.txt │ │ allocs/op │ allocs/op vs base │ SpanEnd-12 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ ¹ all samples are equal ``` --------- Co-authored-by: David Ashpole <dashpole@google.com> Co-authored-by: Damien Mathieu <42@dmathieu.com>