1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-26 21:05:00 +02:00
opentelemetry-go/sdk
Warnar Boekkooi 3cbd967152
Performance improvements for recordingSpan SetAttributes and addOverCapAttrs (#5864)
Good day,

While working on
https://github.com/open-telemetry/opentelemetry-go/pull/5858 I found
some other possible improvements.

This PR:
- Adds an early return to `SetAttributes` when no attributes are
provided.
- Only increases `s.attributes` to guarantee that there is enough space
for elements to be added.
- Fixes and issue where `truncateAttr` was not used when a attribute was
being updated in `addOverCapAttrs`.

Thanks for reviewing and please let me know if any changes are needed.

---------

Co-authored-by: Damien Mathieu <42@dmathieu.com>
2024-10-07 09:30:29 +02:00
..
instrumentation Allow relying on InstrumentationScope in SpanStub and fix remaining deprecation issues (#5627) 2024-07-24 09:33:07 +02:00
internal [chore]: enable suite-extra-assert-call rule from testifylint (#5833) 2024-09-23 08:56:45 +02:00
log fix(deps): update golang.org/x (#5872) 2024-10-07 09:13:11 +02:00
metric fix(deps): update golang.org/x (#5872) 2024-10-07 09:13:11 +02:00
resource [chore]: enable expected-actual rule from testifylint (#5848) 2024-09-26 12:04:33 +02:00
trace Performance improvements for recordingSpan SetAttributes and addOverCapAttrs (#5864) 2024-10-07 09:30:29 +02:00
go.mod fix(deps): update golang.org/x (#5872) 2024-10-07 09:13:11 +02:00
go.sum fix(deps): update golang.org/x (#5872) 2024-10-07 09:13:11 +02:00
README.md Add READMEs to every package (#5103) 2024-03-26 20:13:54 +01:00
version_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
version.go Release v1.30.0/v0.52.0/v0.6.0/v0.0.9 (#5797) 2024-09-10 14:10:56 -07:00

SDK

PkgGoDev