Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance improvements for recordingSpan SetAttributes and addOverCapAttrs #5864

Merged

Commits on Oct 2, 2024

  1. trace: SetAttributes only when attributes are provided

    benchstat:
    ```
    goos: linux
    goarch: amd64
    pkg: go.opentelemetry.io/otel/sdk/trace
    cpu: 11th Gen Intel(R) Core(TM) i5-11400H @ 2.70GHz
                                     │   new.txt    │              new1.txt               │
                                     │    sec/op    │   sec/op     vs base                │
    TraceStart/with_a_simple_span-12   451.0n ±  5%   375.0n ± 1%  -16.85% (p=0.000 n=10)
    TraceStart/with_several_links-12   595.8n ±  3%   501.7n ± 1%  -15.80% (p=0.000 n=10)
    TraceStart/with_attributes-12      644.5n ± 10%   569.5n ± 4%  -11.63% (p=0.000 n=10)
    geomean                            557.4n         474.9n       -14.79%
    
                                     │  new.txt   │              new1.txt               │
                                     │    B/op    │    B/op     vs base                 │
    TraceStart/with_a_simple_span-12   496.0 ± 0%   496.0 ± 0%       ~ (p=1.000 n=10) ¹
    TraceStart/with_several_links-12   672.0 ± 0%   672.0 ± 0%       ~ (p=1.000 n=10) ¹
    TraceStart/with_attributes-12      752.0 ± 0%   752.0 ± 0%       ~ (p=1.000 n=10) ¹
    geomean                            630.5        630.5       +0.00%
    ¹ all samples are equal
    
                                     │  new.txt   │              new1.txt               │
                                     │ allocs/op  │ allocs/op   vs base                 │
    TraceStart/with_a_simple_span-12   2.000 ± 0%   2.000 ± 0%       ~ (p=1.000 n=10) ¹
    TraceStart/with_several_links-12   3.000 ± 0%   3.000 ± 0%       ~ (p=1.000 n=10) ¹
    TraceStart/with_attributes-12      4.000 ± 0%   4.000 ± 0%       ~ (p=1.000 n=10) ¹
    geomean                            2.884        2.884       +0.00%
    ¹ all samples are equal
    ```
    boekkooi-impossiblecloud committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    13b53c9 View commit details
    Browse the repository at this point in the history
  2. fix: grow s.attributes only when needed

    Grow increases the slice's capacity, if necessary, to guarantee space for another n elements.
    This change now ensures that `n` is the amount of elements to grow and not the capacity amount.
    boekkooi-impossiblecloud committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    ef84c7b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3737aec View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2024

  1. Configuration menu
    Copy the full SHA
    48156c1 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2024

  1. Configuration menu
    Copy the full SHA
    f6fd877 View commit details
    Browse the repository at this point in the history
  2. Update CHANGELOG.md

    Co-authored-by: Damien Mathieu <[email protected]>
    boekkooi-impossiblecloud and dmathieu authored Oct 4, 2024
    Configuration menu
    Copy the full SHA
    6185ce3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6bc49cf View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2024

  1. Configuration menu
    Copy the full SHA
    c8f11cb View commit details
    Browse the repository at this point in the history