1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-28 21:09:17 +02:00
opentelemetry-go/sdk/trace
Warnar Boekkooi 64416533d5
Performance improvements for the trace SDK in Span. (#5874)
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>
2024-10-09 09:51:17 +02:00
..
tracetest [chore]: enable len and empty rules from testifylint (#5832) 2024-09-21 08:04:28 -07:00
batch_span_processor_test.go Refactor Batch Processor benchmark to really test OnEnd (#5600) 2024-07-16 09:22:04 +02:00
batch_span_processor.go Fix timer channel drain to avoid hanging in Go 1.23 (#5869) 2024-10-04 09:48:57 +02:00
benchmark_test.go Add unparam linter (#5531) 2024-06-21 16:02:07 -07:00
doc.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
event.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
evictedqueue_test.go Reduce newEvictedQueueLink and newEvictedQueueEvent memory allocations (#5858) 2024-10-08 09:43:14 +02:00
evictedqueue.go Reduce newEvictedQueueLink and newEvictedQueueEvent memory allocations (#5858) 2024-10-08 09:43:14 +02:00
id_generator_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
id_generator.go Fix IDGenerator may generate zero TraceId / SpanId (#5514) 2024-06-18 15:57:45 -07:00
link.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
provider_test.go [chore]: enable error-nil rule from testifylint (#5843) 2024-09-25 11:07:59 +02:00
provider.go Add errorlint linter (#5535) 2024-06-25 10:55:00 -07:00
README.md Add READMEs to every package (#5103) 2024-03-26 20:13:54 +01:00
sampler_env.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
sampling_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
sampling.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
simple_span_processor_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
simple_span_processor.go sdk/trace: fix spelling errors (#4996) 2024-03-25 13:10:08 +01:00
snapshot.go Allow relying on InstrumentationScope in SpanStub and fix remaining deprecation issues (#5627) 2024-07-24 09:33:07 +02:00
span_exporter.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
span_limits_test.go [chore]: enable len and empty rules from testifylint (#5832) 2024-09-21 08:04:28 -07:00
span_limits.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
span_processor_annotator_example_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
span_processor_filter_example_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
span_processor_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
span_processor.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
span_test.go Split the span start/end benchmarks and test start with links and attributes (#5554) 2024-06-28 11:51:09 +02:00
span.go Performance improvements for the trace SDK in Span. (#5874) 2024-10-09 09:51:17 +02:00
trace_test.go [chore]: enable expected-actual rule from testifylint (#5848) 2024-09-26 12:04:33 +02:00
tracer.go trace: Use non-generic to replace newEvictedQueue in trace.start to reduce memory usage. (#5497) 2024-06-17 07:39:03 -07:00
util_test.go Add unparam linter (#5531) 2024-06-21 16:02:07 -07:00
version_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
version.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00

SDK Trace

PkgGoDev