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

Introduce tracing propagator #8313

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PerfectSlayer
Copy link
Contributor

@PerfectSlayer PerfectSlayer commented Jan 30, 2025

What Does This Do

This PR introduce the Tracing propagator. It is register and available from the new propagator API but not used yet in instrumentation (next PR to come).
The PR also introduces the ExtractedSpan implementation, a wrapper of a span context to provide a span instance without the cost of creating a DDSpan, to be able to use span-based API without requiring a full-fledge span. It will be mainly used from extracted span context.

Motivation

The existing HttpCodec.Extractor is based on span context while the new context API can store span, hence the introduction of the ExtractedSpan.
Note the behavior is similar and will be compatible with OTel.

Additional Notes

I plan to get rid of the original getter / setter for HttpCodec in favor of the ones introduced in the context component.

Contributor Checklist

Jira ticket: LANGPLAT-293

Copy link
Contributor

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

@PerfectSlayer PerfectSlayer requested a review from mcculls January 30, 2025 16:52
@pr-commenter
Copy link

pr-commenter bot commented Jan 30, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/context-propagation-step2
git_commit_date 1738258381 1738258724
git_commit_sha e455ca7 522049f
release_version 1.46.0-SNAPSHOT~e455ca77d9 1.46.0-SNAPSHOT~522049f59c
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1738261084 1738261084
ci_job_id 787953952 787953952
ci_pipeline_id 54486782 54486782
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-szptc8oi-project-304-concurrent-0-es0rfz2s 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:50:46 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Linux runner-szptc8oi-project-304-concurrent-0-es0rfz2s 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:50:46 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None
variant iast iast

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 52 metrics, 11 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.46.0-SNAPSHOT~522049f59c, baseline=1.46.0-SNAPSHOT~e455ca77d9

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.036 s) : 0, 1036194
Total [baseline] (8.624 s) : 0, 8624006
Agent [candidate] (1.048 s) : 0, 1048196
Total [candidate] (8.69 s) : 0, 8689516
section iast
Agent [baseline] (1.169 s) : 0, 1168769
Total [baseline] (9.239 s) : 0, 9238834
Agent [candidate] (1.179 s) : 0, 1179141
Total [candidate] (9.282 s) : 0, 9282474
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.169 s) : 0, 1168858
Total [baseline] (9.196 s) : 0, 9195539
Agent [candidate] (1.173 s) : 0, 1173246
Total [candidate] (9.219 s) : 0, 9219462
section iast_TELEMETRY_OFF
Agent [baseline] (1.167 s) : 0, 1166650
Total [baseline] (9.231 s) : 0, 9231122
Agent [candidate] (1.174 s) : 0, 1174014
Total [candidate] (9.232 s) : 0, 9232044
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.036 s -
Agent iast 1.169 s 132.574 ms (12.8%)
Agent iast_HARDCODED_SECRET_DISABLED 1.169 s 132.664 ms (12.8%)
Agent iast_TELEMETRY_OFF 1.167 s 130.455 ms (12.6%)
Total tracing 8.624 s -
Total iast 9.239 s 614.828 ms (7.1%)
Total iast_HARDCODED_SECRET_DISABLED 9.196 s 571.532 ms (6.6%)
Total iast_TELEMETRY_OFF 9.231 s 607.116 ms (7.0%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.048 s -
Agent iast 1.179 s 130.945 ms (12.5%)
Agent iast_HARDCODED_SECRET_DISABLED 1.173 s 125.05 ms (11.9%)
Agent iast_TELEMETRY_OFF 1.174 s 125.818 ms (12.0%)
Total tracing 8.69 s -
Total iast 9.282 s 592.958 ms (6.8%)
Total iast_HARDCODED_SECRET_DISABLED 9.219 s 529.946 ms (6.1%)
Total iast_TELEMETRY_OFF 9.232 s 542.528 ms (6.2%)
gantt
    title insecure-bank - break down per module: candidate=1.46.0-SNAPSHOT~522049f59c, baseline=1.46.0-SNAPSHOT~e455ca77d9

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (714.015 ms) : 0, 714015
BytebuddyAgent [candidate] (720.575 ms) : 0, 720575
GlobalTracer [baseline] (239.752 ms) : 0, 239752
GlobalTracer [candidate] (244.721 ms) : 0, 244721
AppSec [baseline] (55.659 ms) : 0, 55659
AppSec [candidate] (55.867 ms) : 0, 55867
Remote Config [baseline] (729.41 µs) : 0, 729
Remote Config [candidate] (735.755 µs) : 0, 736
Telemetry [baseline] (10.821 ms) : 0, 10821
Telemetry [candidate] (10.929 ms) : 0, 10929
section iast
BytebuddyAgent [baseline] (833.556 ms) : 0, 833556
BytebuddyAgent [candidate] (839.569 ms) : 0, 839569
GlobalTracer [baseline] (230.932 ms) : 0, 230932
GlobalTracer [candidate] (234.65 ms) : 0, 234650
IAST [baseline] (24.859 ms) : 0, 24859
IAST [candidate] (23.514 ms) : 0, 23514
AppSec [baseline] (54.747 ms) : 0, 54747
AppSec [candidate] (56.55 ms) : 0, 56550
Remote Config [baseline] (613.012 µs) : 0, 613
Remote Config [candidate] (621.945 µs) : 0, 622
Telemetry [baseline] (8.704 ms) : 0, 8704
Telemetry [candidate] (8.74 ms) : 0, 8740
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (833.642 ms) : 0, 833642
BytebuddyAgent [candidate] (834.193 ms) : 0, 834193
GlobalTracer [baseline] (230.963 ms) : 0, 230963
GlobalTracer [candidate] (234.027 ms) : 0, 234027
IAST [baseline] (26.311 ms) : 0, 26311
IAST [candidate] (25.91 ms) : 0, 25910
AppSec [baseline] (53.153 ms) : 0, 53153
AppSec [candidate] (54.348 ms) : 0, 54348
Remote Config [baseline] (615.259 µs) : 0, 615
Remote Config [candidate] (625.265 µs) : 0, 625
Telemetry [baseline] (8.8 ms) : 0, 8800
Telemetry [candidate] (8.775 ms) : 0, 8775
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (831.933 ms) : 0, 831933
BytebuddyAgent [candidate] (835.567 ms) : 0, 835567
GlobalTracer [baseline] (231.078 ms) : 0, 231078
GlobalTracer [candidate] (234.34 ms) : 0, 234340
IAST [baseline] (25.129 ms) : 0, 25129
IAST [candidate] (26.302 ms) : 0, 26302
AppSec [baseline] (53.99 ms) : 0, 53990
AppSec [candidate] (53.03 ms) : 0, 53030
Remote Config [baseline] (623.655 µs) : 0, 624
Remote Config [candidate] (627.983 µs) : 0, 628
Telemetry [baseline] (8.56 ms) : 0, 8560
Telemetry [candidate] (8.685 ms) : 0, 8685
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.46.0-SNAPSHOT~522049f59c, baseline=1.46.0-SNAPSHOT~e455ca77d9

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.037 s) : 0, 1037254
Total [baseline] (10.543 s) : 0, 10542637
Agent [candidate] (1.043 s) : 0, 1042748
Total [candidate] (10.529 s) : 0, 10529400
section appsec
Agent [baseline] (1.181 s) : 0, 1180530
Total [baseline] (10.722 s) : 0, 10721612
Agent [candidate] (1.184 s) : 0, 1184296
Total [candidate] (10.746 s) : 0, 10746252
section iast
Agent [baseline] (1.17 s) : 0, 1169940
Total [baseline] (11.02 s) : 0, 11019936
Agent [candidate] (1.192 s) : 0, 1191931
Total [candidate] (11.065 s) : 0, 11064941
section profiling
Agent [baseline] (1.267 s) : 0, 1266506
Total [baseline] (10.95 s) : 0, 10950185
Agent [candidate] (1.265 s) : 0, 1265006
Total [candidate] (10.913 s) : 0, 10913076
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.037 s -
Agent appsec 1.181 s 143.277 ms (13.8%)
Agent iast 1.17 s 132.686 ms (12.8%)
Agent profiling 1.267 s 229.252 ms (22.1%)
Total tracing 10.543 s -
Total appsec 10.722 s 178.975 ms (1.7%)
Total iast 11.02 s 477.298 ms (4.5%)
Total profiling 10.95 s 407.548 ms (3.9%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.043 s -
Agent appsec 1.184 s 141.548 ms (13.6%)
Agent iast 1.192 s 149.183 ms (14.3%)
Agent profiling 1.265 s 222.258 ms (21.3%)
Total tracing 10.529 s -
Total appsec 10.746 s 216.853 ms (2.1%)
Total iast 11.065 s 535.541 ms (5.1%)
Total profiling 10.913 s 383.677 ms (3.6%)
gantt
    title petclinic - break down per module: candidate=1.46.0-SNAPSHOT~522049f59c, baseline=1.46.0-SNAPSHOT~e455ca77d9

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (714.971 ms) : 0, 714971
BytebuddyAgent [candidate] (715.461 ms) : 0, 715461
GlobalTracer [baseline] (239.596 ms) : 0, 239596
GlobalTracer [candidate] (242.989 ms) : 0, 242989
AppSec [baseline] (55.097 ms) : 0, 55097
AppSec [candidate] (56.05 ms) : 0, 56050
Remote Config [baseline] (720.888 µs) : 0, 721
Remote Config [candidate] (713.312 µs) : 0, 713
Telemetry [baseline] (11.593 ms) : 0, 11593
Telemetry [candidate] (12.302 ms) : 0, 12302
section appsec
BytebuddyAgent [baseline] (731.747 ms) : 0, 731747
BytebuddyAgent [candidate] (732.679 ms) : 0, 732679
GlobalTracer [baseline] (237.328 ms) : 0, 237328
GlobalTracer [candidate] (240.417 ms) : 0, 240417
IAST [baseline] (21.559 ms) : 0, 21559
IAST [candidate] (21.603 ms) : 0, 21603
AppSec [baseline] (176.407 ms) : 0, 176407
AppSec [candidate] (175.816 ms) : 0, 175816
Remote Config [baseline] (655.64 µs) : 0, 656
Remote Config [candidate] (655.636 µs) : 0, 656
Telemetry [baseline] (8.336 ms) : 0, 8336
Telemetry [candidate] (8.662 ms) : 0, 8662
section iast
BytebuddyAgent [baseline] (834.548 ms) : 0, 834548
BytebuddyAgent [candidate] (848.648 ms) : 0, 848648
GlobalTracer [baseline] (231.294 ms) : 0, 231294
GlobalTracer [candidate] (237.246 ms) : 0, 237246
IAST [baseline] (25.555 ms) : 0, 25555
IAST [candidate] (29.615 ms) : 0, 29615
AppSec [baseline] (53.965 ms) : 0, 53965
AppSec [candidate] (51.339 ms) : 0, 51339
Remote Config [baseline] (616.209 µs) : 0, 616
Remote Config [candidate] (619.898 µs) : 0, 620
Telemetry [baseline] (8.673 ms) : 0, 8673
Telemetry [candidate] (8.899 ms) : 0, 8899
section profiling
BytebuddyAgent [baseline] (708.904 ms) : 0, 708904
BytebuddyAgent [candidate] (707.441 ms) : 0, 707441
GlobalTracer [baseline] (353.843 ms) : 0, 353843
GlobalTracer [candidate] (354.84 ms) : 0, 354840
AppSec [baseline] (55.285 ms) : 0, 55285
AppSec [candidate] (54.438 ms) : 0, 54438
Remote Config [baseline] (711.647 µs) : 0, 712
Remote Config [candidate] (712.972 µs) : 0, 713
Telemetry [baseline] (8.884 ms) : 0, 8884
Telemetry [candidate] (8.896 ms) : 0, 8896
ProfilingAgent [baseline] (96.501 ms) : 0, 96501
ProfilingAgent [candidate] (96.314 ms) : 0, 96314
Profiling [baseline] (96.528 ms) : 0, 96528
Profiling [candidate] (96.342 ms) : 0, 96342
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-01-30T17:49:54 2025-01-30T17:56:58
git_branch master bbujon/context-propagation-step2
git_commit_date 1738258381 1738258724
git_commit_sha e455ca7 522049f
release_version 1.46.0-SNAPSHOT~e455ca77d9 1.46.0-SNAPSHOT~522049f59c
start_time 2025-01-30T17:49:40 2025-01-30T17:56:44
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1738260176 1738260176
ci_job_id 787953953 787953953
ci_pipeline_id 54486782 54486782
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-k9ef9rs-project-304-concurrent-0-0p8jbkgo 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:50:46 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Linux runner-k9ef9rs-project-304-concurrent-0-0p8jbkgo 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:50:46 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
variant iast iast

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 17 unstable metrics.

Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.46.0-SNAPSHOT~522049f59c, baseline=1.46.0-SNAPSHOT~e455ca77d9
    dateFormat X
    axisFormat %s
section baseline
no_agent (375.41 µs) : 356, 395
.   : milestone, 375,
iast (512.995 µs) : 489, 537
.   : milestone, 513,
iast_FULL (741.975 µs) : 720, 764
.   : milestone, 742,
iast_GLOBAL (552.979 µs) : 530, 576
.   : milestone, 553,
iast_HARDCODED_SECRET_DISABLED (513.534 µs) : 490, 537
.   : milestone, 514,
iast_INACTIVE (460.776 µs) : 439, 483
.   : milestone, 461,
iast_TELEMETRY_OFF (493.453 µs) : 471, 516
.   : milestone, 493,
tracing (453.377 µs) : 432, 475
.   : milestone, 453,
section candidate
no_agent (384.979 µs) : 365, 405
.   : milestone, 385,
iast (508.875 µs) : 487, 530
.   : milestone, 509,
iast_FULL (745.17 µs) : 723, 767
.   : milestone, 745,
iast_GLOBAL (566.92 µs) : 545, 589
.   : milestone, 567,
iast_HARDCODED_SECRET_DISABLED (504.679 µs) : 483, 526
.   : milestone, 505,
iast_INACTIVE (455.07 µs) : 434, 476
.   : milestone, 455,
iast_TELEMETRY_OFF (498.613 µs) : 476, 522
.   : milestone, 499,
tracing (454.708 µs) : 431, 478
.   : milestone, 455,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 375.41 µs [355.849 µs, 394.97 µs] -
iast 512.995 µs [489.445 µs, 536.546 µs] 137.586 µs (36.6%)
iast_FULL 741.975 µs [719.926 µs, 764.024 µs] 366.565 µs (97.6%)
iast_GLOBAL 552.979 µs [529.951 µs, 576.006 µs] 177.569 µs (47.3%)
iast_HARDCODED_SECRET_DISABLED 513.534 µs [489.975 µs, 537.094 µs] 138.125 µs (36.8%)
iast_INACTIVE 460.776 µs [438.955 µs, 482.596 µs] 85.366 µs (22.7%)
iast_TELEMETRY_OFF 493.453 µs [470.606 µs, 516.301 µs] 118.044 µs (31.4%)
tracing 453.377 µs [431.774 µs, 474.98 µs] 77.967 µs (20.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 384.979 µs [364.57 µs, 405.388 µs] -
iast 508.875 µs [487.267 µs, 530.484 µs] 123.896 µs (32.2%)
iast_FULL 745.17 µs [723.255 µs, 767.084 µs] 360.191 µs (93.6%)
iast_GLOBAL 566.92 µs [544.831 µs, 589.008 µs] 181.941 µs (47.3%)
iast_HARDCODED_SECRET_DISABLED 504.679 µs [482.926 µs, 526.432 µs] 119.7 µs (31.1%)
iast_INACTIVE 455.07 µs [434.138 µs, 476.003 µs] 70.091 µs (18.2%)
iast_TELEMETRY_OFF 498.613 µs [475.526 µs, 521.699 µs] 113.634 µs (29.5%)
tracing 454.708 µs [430.918 µs, 478.498 µs] 69.729 µs (18.1%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.46.0-SNAPSHOT~522049f59c, baseline=1.46.0-SNAPSHOT~e455ca77d9
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.368 ms) : 1348, 1389
.   : milestone, 1368,
appsec (1.771 ms) : 1748, 1794
.   : milestone, 1771,
appsec_no_iast (1.754 ms) : 1729, 1779
.   : milestone, 1754,
iast (1.493 ms) : 1468, 1518
.   : milestone, 1493,
profiling (1.51 ms) : 1487, 1533
.   : milestone, 1510,
tracing (1.5 ms) : 1474, 1526
.   : milestone, 1500,
section candidate
no_agent (1.345 ms) : 1326, 1365
.   : milestone, 1345,
appsec (1.739 ms) : 1715, 1762
.   : milestone, 1739,
appsec_no_iast (1.75 ms) : 1727, 1773
.   : milestone, 1750,
iast (1.525 ms) : 1500, 1550
.   : milestone, 1525,
profiling (1.525 ms) : 1502, 1548
.   : milestone, 1525,
tracing (1.494 ms) : 1470, 1519
.   : milestone, 1494,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.368 ms [1.348 ms, 1.389 ms] -
appsec 1.771 ms [1.748 ms, 1.794 ms] 402.945 µs (29.4%)
appsec_no_iast 1.754 ms [1.729 ms, 1.779 ms] 385.916 µs (28.2%)
iast 1.493 ms [1.468 ms, 1.518 ms] 124.656 µs (9.1%)
profiling 1.51 ms [1.487 ms, 1.533 ms] 141.728 µs (10.4%)
tracing 1.5 ms [1.474 ms, 1.526 ms] 131.773 µs (9.6%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.345 ms [1.326 ms, 1.365 ms] -
appsec 1.739 ms [1.715 ms, 1.762 ms] 393.509 µs (29.3%)
appsec_no_iast 1.75 ms [1.727 ms, 1.773 ms] 405.146 µs (30.1%)
iast 1.525 ms [1.5 ms, 1.55 ms] 179.851 µs (13.4%)
profiling 1.525 ms [1.502 ms, 1.548 ms] 180.038 µs (13.4%)
tracing 1.494 ms [1.47 ms, 1.519 ms] 149.212 µs (11.1%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/context-propagation-step2
git_commit_date 1738258381 1738258724
git_commit_sha e455ca7 522049f
release_version 1.46.0-SNAPSHOT~e455ca77d9 1.46.0-SNAPSHOT~522049f59c
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1738260714 1738260714
ci_job_id 787953954 787953954
ci_pipeline_id 54486782 54486782
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-szptc8oi-project-304-concurrent-1-kmo3d8o8 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:50:46 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Linux runner-szptc8oi-project-304-concurrent-1-kmo3d8o8 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:50:46 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
variant appsec appsec

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics.

Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.46.0-SNAPSHOT~522049f59c, baseline=1.46.0-SNAPSHOT~e455ca77d9
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.464 ms) : 1453, 1476
.   : milestone, 1464,
appsec (2.354 ms) : 2311, 2397
.   : milestone, 2354,
iast (2.103 ms) : 2048, 2158
.   : milestone, 2103,
iast_GLOBAL (2.14 ms) : 2086, 2195
.   : milestone, 2140,
profiling (1.969 ms) : 1924, 2013
.   : milestone, 1969,
tracing (1.931 ms) : 1889, 1973
.   : milestone, 1931,
section candidate
no_agent (1.465 ms) : 1454, 1477
.   : milestone, 1465,
appsec (2.344 ms) : 2300, 2387
.   : milestone, 2344,
iast (2.1 ms) : 2045, 2154
.   : milestone, 2100,
iast_GLOBAL (2.143 ms) : 2088, 2198
.   : milestone, 2143,
profiling (1.945 ms) : 1902, 1988
.   : milestone, 1945,
tracing (1.944 ms) : 1901, 1986
.   : milestone, 1944,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.464 ms [1.453 ms, 1.476 ms] -
appsec 2.354 ms [2.311 ms, 2.397 ms] 890.148 µs (60.8%)
iast 2.103 ms [2.048 ms, 2.158 ms] 638.998 µs (43.6%)
iast_GLOBAL 2.14 ms [2.086 ms, 2.195 ms] 676.235 µs (46.2%)
profiling 1.969 ms [1.924 ms, 2.013 ms] 504.392 µs (34.4%)
tracing 1.931 ms [1.889 ms, 1.973 ms] 466.889 µs (31.9%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.465 ms [1.454 ms, 1.477 ms] -
appsec 2.344 ms [2.3 ms, 2.387 ms] 878.295 µs (59.9%)
iast 2.1 ms [2.045 ms, 2.154 ms] 634.257 µs (43.3%)
iast_GLOBAL 2.143 ms [2.088 ms, 2.198 ms] 677.741 µs (46.3%)
profiling 1.945 ms [1.902 ms, 1.988 ms] 479.916 µs (32.8%)
tracing 1.944 ms [1.901 ms, 1.986 ms] 478.431 µs (32.7%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.46.0-SNAPSHOT~522049f59c, baseline=1.46.0-SNAPSHOT~e455ca77d9
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.302 s) : 15302000, 15302000
.   : milestone, 15302000,
appsec (15.081 s) : 15081000, 15081000
.   : milestone, 15081000,
iast (18.313 s) : 18313000, 18313000
.   : milestone, 18313000,
iast_GLOBAL (17.894 s) : 17894000, 17894000
.   : milestone, 17894000,
profiling (15.163 s) : 15163000, 15163000
.   : milestone, 15163000,
tracing (14.906 s) : 14906000, 14906000
.   : milestone, 14906000,
section candidate
no_agent (15.419 s) : 15419000, 15419000
.   : milestone, 15419000,
appsec (15.012 s) : 15012000, 15012000
.   : milestone, 15012000,
iast (18.375 s) : 18375000, 18375000
.   : milestone, 18375000,
iast_GLOBAL (18.173 s) : 18173000, 18173000
.   : milestone, 18173000,
profiling (14.93 s) : 14930000, 14930000
.   : milestone, 14930000,
tracing (15.084 s) : 15084000, 15084000
.   : milestone, 15084000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.302 s [15.302 s, 15.302 s] -
appsec 15.081 s [15.081 s, 15.081 s] -221.0 ms (-1.4%)
iast 18.313 s [18.313 s, 18.313 s] 3.011 s (19.7%)
iast_GLOBAL 17.894 s [17.894 s, 17.894 s] 2.592 s (16.9%)
profiling 15.163 s [15.163 s, 15.163 s] -139.0 ms (-0.9%)
tracing 14.906 s [14.906 s, 14.906 s] -396.0 ms (-2.6%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.419 s [15.419 s, 15.419 s] -
appsec 15.012 s [15.012 s, 15.012 s] -407.0 ms (-2.6%)
iast 18.375 s [18.375 s, 18.375 s] 2.956 s (19.2%)
iast_GLOBAL 18.173 s [18.173 s, 18.173 s] 2.754 s (17.9%)
profiling 14.93 s [14.93 s, 14.93 s] -489.0 ms (-3.2%)
tracing 15.084 s [15.084 s, 15.084 s] -335.0 ms (-2.2%)


@Override
public String getBaggageItem(final String key) {
Iterable<Map.Entry<String, String>> baggage = this.spanContext.baggageItems();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity, why aren't we exposing something from the context that allows for better querying?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heh - looks this was introduced very early on in PR #2 !

I would also be interested if it's possible to switch to a map-like API here for the intervening call or if this is something we can only really rip out once we complete the migration to the new context API.

Copy link
Member

@manuel-alvarez-alvarez manuel-alvarez-alvarez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (but a more informed review is in order 😄)

* <p>Tags and baggage access are inefficient and only supported as remediation for products
* storing propagated information into span context, until they migrate to the new context API.
*/
static final class ExtractedSpan extends AgentTracer.NoopAgentSpan {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few places in instrumentation that check span instanceof AgentTracer.NoopAgentSpan and use that to suppress tracing (the other sub-class is BlackholeAgentSpan)

Is there a reason to extend NoopAgentSpan other than to re-use methods? Maybe it would be better to introduce a new base class such as ImmutableSpan which both ExtractedSpan and NoopAgentSpan can extend?

/**
* Creates a span wrapper from a span context.
*
* <p>Creating a such span will not create a tracing span to complete a local root trace. It gives
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* <p>Creating a such span will not create a tracing span to complete a local root trace. It gives
* <p>Creating such span will not create a tracing span to complete a local root trace. It gives

*
* <p>Creating a such span will not create a tracing span to complete a local root trace. It gives
* a span instance based on a span context for span-based API. It is usually used with an
* extracted span context as parameter to represent a remove span.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* extracted span context as parameter to represent a remove span.
* extracted span context as parameter to represent a remote span.

* extracted span context as parameter to represent a remove span.
*
* @param spanContext the span context to get a full-fledged span.
* @return a span wrapped based on a span context.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @return a span wrapped based on a span context.
* @return a span wrapper based on a span context.

Copy link
Contributor

@mcculls mcculls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - just a question if ExtractedSpan should really extend NoopAgentSpan or whether we should introduce a common base class ImmutableSpan which both can extend separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants