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

Move Attributes implementation outside of SpanLink class #7399

Merged
merged 11 commits into from
Aug 14, 2024

Conversation

mtoffl01
Copy link
Contributor

@mtoffl01 mtoffl01 commented Aug 7, 2024

What Does This Do

The Attributes interface and class is now independent of the SpanLinks interface/class.

Motivation

With upcoming plans to implement the Span Events API, the existing Attributes functionality/helper methods must be accessible to the forthcoming SpanEvent class, and therefore should not be exclusive to SpanLinks functionality.

Additional Notes

This PR is meant as a "pre-req" to implementing span events.

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@pr-commenter
Copy link

pr-commenter bot commented Aug 7, 2024

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mtoff/otel-sdk-attributes
git_commit_date 1723583620 1723621237
git_commit_sha 4c58087 96dcbbe
release_version 1.39.0-SNAPSHOT~4c58087c38 1.39.0-SNAPSHOT~96dcbbe614
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1723623671 1723623671
ci_job_id 604496168 604496168
ci_pipeline_id 41729035 41729035
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
module Agent Agent
parent None None
variant iast iast

Summary

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

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:petclinic:iast:AppSec worse
[+3.278ms; +7.398ms] or [+6.638%; +14.978%]
54.727ms 49.389ms
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.39.0-SNAPSHOT~96dcbbe614, baseline=1.39.0-SNAPSHOT~4c58087c38

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.058 s) : 0, 1057898
Total [baseline] (8.508 s) : 0, 8507975
Agent [candidate] (1.051 s) : 0, 1051016
Total [candidate] (8.513 s) : 0, 8512976
section iast
Agent [baseline] (1.174 s) : 0, 1174157
Total [baseline] (8.989 s) : 0, 8989439
Agent [candidate] (1.184 s) : 0, 1184327
Total [candidate] (9.0 s) : 0, 8999971
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.188 s) : 0, 1188367
Total [baseline] (8.995 s) : 0, 8994752
Agent [candidate] (1.186 s) : 0, 1185928
Total [candidate] (8.984 s) : 0, 8984159
section iast_TELEMETRY_OFF
Agent [baseline] (1.169 s) : 0, 1169081
Total [baseline] (8.987 s) : 0, 8987154
Agent [candidate] (1.18 s) : 0, 1180279
Total [candidate] (9.013 s) : 0, 9013323
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.058 s -
Agent iast 1.174 s 116.258 ms (11.0%)
Agent iast_HARDCODED_SECRET_DISABLED 1.188 s 130.468 ms (12.3%)
Agent iast_TELEMETRY_OFF 1.169 s 111.183 ms (10.5%)
Total tracing 8.508 s -
Total iast 8.989 s 481.464 ms (5.7%)
Total iast_HARDCODED_SECRET_DISABLED 8.995 s 486.777 ms (5.7%)
Total iast_TELEMETRY_OFF 8.987 s 479.179 ms (5.6%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.051 s -
Agent iast 1.184 s 133.312 ms (12.7%)
Agent iast_HARDCODED_SECRET_DISABLED 1.186 s 134.912 ms (12.8%)
Agent iast_TELEMETRY_OFF 1.18 s 129.263 ms (12.3%)
Total tracing 8.513 s -
Total iast 9.0 s 486.995 ms (5.7%)
Total iast_HARDCODED_SECRET_DISABLED 8.984 s 471.183 ms (5.5%)
Total iast_TELEMETRY_OFF 9.013 s 500.348 ms (5.9%)
gantt
    title insecure-bank - break down per module: candidate=1.39.0-SNAPSHOT~96dcbbe614, baseline=1.39.0-SNAPSHOT~4c58087c38

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (675.272 ms) : 0, 675272
BytebuddyAgent [candidate] (671.99 ms) : 0, 671990
GlobalTracer [baseline] (309.28 ms) : 0, 309280
GlobalTracer [candidate] (307.05 ms) : 0, 307050
AppSec [baseline] (51.522 ms) : 0, 51522
AppSec [candidate] (50.428 ms) : 0, 50428
Remote Config [baseline] (692.156 µs) : 0, 692
Remote Config [candidate] (685.603 µs) : 0, 686
Telemetry [baseline] (7.596 ms) : 0, 7596
Telemetry [candidate] (7.361 ms) : 0, 7361
section iast
BytebuddyAgent [baseline] (781.084 ms) : 0, 781084
BytebuddyAgent [candidate] (788.749 ms) : 0, 788749
GlobalTracer [baseline] (295.559 ms) : 0, 295559
GlobalTracer [candidate] (298.794 ms) : 0, 298794
AppSec [baseline] (53.259 ms) : 0, 53259
AppSec [candidate] (52.088 ms) : 0, 52088
IAST [baseline] (22.343 ms) : 0, 22343
IAST [candidate] (22.64 ms) : 0, 22640
Remote Config [baseline] (565.983 µs) : 0, 566
Remote Config [candidate] (574.699 µs) : 0, 575
Telemetry [baseline] (7.906 ms) : 0, 7906
Telemetry [candidate] (7.923 ms) : 0, 7923
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (789.646 ms) : 0, 789646
BytebuddyAgent [candidate] (790.59 ms) : 0, 790590
GlobalTracer [baseline] (299.45 ms) : 0, 299450
GlobalTracer [candidate] (299.244 ms) : 0, 299244
AppSec [baseline] (50.646 ms) : 0, 50646
AppSec [candidate] (49.059 ms) : 0, 49059
IAST [baseline] (24.038 ms) : 0, 24038
IAST [candidate] (24.802 ms) : 0, 24802
Remote Config [baseline] (599.168 µs) : 0, 599
Remote Config [candidate] (601.057 µs) : 0, 601
Telemetry [baseline] (10.344 ms) : 0, 10344
Telemetry [candidate] (7.966 ms) : 0, 7966
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (778.438 ms) : 0, 778438
BytebuddyAgent [candidate] (785.265 ms) : 0, 785265
GlobalTracer [baseline] (296.35 ms) : 0, 296350
GlobalTracer [candidate] (298.825 ms) : 0, 298825
AppSec [baseline] (51.699 ms) : 0, 51699
AppSec [candidate] (48.598 ms) : 0, 48598
IAST [baseline] (21.424 ms) : 0, 21424
IAST [candidate] (25.655 ms) : 0, 25655
Remote Config [baseline] (605.264 µs) : 0, 605
Remote Config [candidate] (619.146 µs) : 0, 619
Telemetry [baseline] (7.078 ms) : 0, 7078
Telemetry [candidate] (7.753 ms) : 0, 7753
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.39.0-SNAPSHOT~96dcbbe614, baseline=1.39.0-SNAPSHOT~4c58087c38

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.055 s) : 0, 1054530
Total [baseline] (10.403 s) : 0, 10402911
Agent [candidate] (1.046 s) : 0, 1046282
Total [candidate] (10.329 s) : 0, 10329182
section appsec
Agent [baseline] (1.174 s) : 0, 1174360
Total [baseline] (10.519 s) : 0, 10519034
Agent [candidate] (1.168 s) : 0, 1168058
Total [candidate] (10.493 s) : 0, 10492900
section iast
Agent [baseline] (1.175 s) : 0, 1175247
Total [baseline] (10.815 s) : 0, 10814696
Agent [candidate] (1.176 s) : 0, 1175881
Total [candidate] (10.763 s) : 0, 10762683
section profiling
Agent [baseline] (1.264 s) : 0, 1263597
Total [baseline] (10.709 s) : 0, 10708509
Agent [candidate] (1.261 s) : 0, 1260954
Total [candidate] (10.604 s) : 0, 10604252
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.055 s -
Agent appsec 1.174 s 119.831 ms (11.4%)
Agent iast 1.175 s 120.717 ms (11.4%)
Agent profiling 1.264 s 209.067 ms (19.8%)
Total tracing 10.403 s -
Total appsec 10.519 s 116.123 ms (1.1%)
Total iast 10.815 s 411.785 ms (4.0%)
Total profiling 10.709 s 305.598 ms (2.9%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.046 s -
Agent appsec 1.168 s 121.776 ms (11.6%)
Agent iast 1.176 s 129.599 ms (12.4%)
Agent profiling 1.261 s 214.673 ms (20.5%)
Total tracing 10.329 s -
Total appsec 10.493 s 163.717 ms (1.6%)
Total iast 10.763 s 433.501 ms (4.2%)
Total profiling 10.604 s 275.07 ms (2.7%)
gantt
    title petclinic - break down per module: candidate=1.39.0-SNAPSHOT~96dcbbe614, baseline=1.39.0-SNAPSHOT~4c58087c38

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (672.749 ms) : 0, 672749
BytebuddyAgent [candidate] (667.562 ms) : 0, 667562
GlobalTracer [baseline] (308.521 ms) : 0, 308521
GlobalTracer [candidate] (306.683 ms) : 0, 306683
AppSec [baseline] (51.471 ms) : 0, 51471
AppSec [candidate] (50.585 ms) : 0, 50585
Remote Config [baseline] (707.688 µs) : 0, 708
Remote Config [candidate] (692.181 µs) : 0, 692
Telemetry [baseline] (7.563 ms) : 0, 7563
Telemetry [candidate] (7.316 ms) : 0, 7316
section appsec
BytebuddyAgent [baseline] (680.93 ms) : 0, 680930
BytebuddyAgent [candidate] (678.916 ms) : 0, 678916
GlobalTracer [baseline] (301.405 ms) : 0, 301405
GlobalTracer [candidate] (299.851 ms) : 0, 299851
AppSec [baseline] (157.662 ms) : 0, 157662
AppSec [candidate] (155.357 ms) : 0, 155357
Remote Config [baseline] (605.304 µs) : 0, 605
Remote Config [candidate] (603.556 µs) : 0, 604
Telemetry [baseline] (9.693 ms) : 0, 9693
Telemetry [candidate] (8.469 ms) : 0, 8469
IAST [baseline] (20.996 ms) : 0, 20996
IAST [candidate] (22.674 ms) : 0, 22674
section iast
BytebuddyAgent [baseline] (781.473 ms) : 0, 781473
BytebuddyAgent [candidate] (782.93 ms) : 0, 782930
GlobalTracer [baseline] (295.668 ms) : 0, 295668
GlobalTracer [candidate] (296.459 ms) : 0, 296459
AppSec [baseline] (49.389 ms) : 0, 49389
AppSec [candidate] (54.727 ms) : 0, 54727
Remote Config [baseline] (573.115 µs) : 0, 573
Remote Config [candidate] (576.426 µs) : 0, 576
Telemetry [baseline] (10.443 ms) : 0, 10443
Telemetry [candidate] (7.003 ms) : 0, 7003
IAST [baseline] (24.228 ms) : 0, 24228
IAST [candidate] (20.672 ms) : 0, 20672
section profiling
ProfilingAgent [baseline] (95.401 ms) : 0, 95401
ProfilingAgent [candidate] (95.78 ms) : 0, 95780
BytebuddyAgent [baseline] (673.62 ms) : 0, 673620
BytebuddyAgent [candidate] (672.504 ms) : 0, 672504
GlobalTracer [baseline] (395.914 ms) : 0, 395914
GlobalTracer [candidate] (394.832 ms) : 0, 394832
AppSec [baseline] (52.734 ms) : 0, 52734
AppSec [candidate] (52.126 ms) : 0, 52126
Remote Config [baseline] (714.86 µs) : 0, 715
Remote Config [candidate] (700.892 µs) : 0, 701
Telemetry [baseline] (7.526 ms) : 0, 7526
Telemetry [candidate] (7.338 ms) : 0, 7338
Profiling [baseline] (95.426 ms) : 0, 95426
Profiling [candidate] (95.805 ms) : 0, 95805
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-08-14T07:51:58 2024-08-14T07:58:45
git_branch master mtoff/otel-sdk-attributes
git_commit_date 1723583620 1723621237
git_commit_sha 4c58087 96dcbbe
release_version 1.39.0-SNAPSHOT~4c58087c38 1.39.0-SNAPSHOT~96dcbbe614
start_time 2024-08-14T07:51:44 2024-08-14T07:58:32
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1723622669 1723622669
ci_job_id 604496169 604496169
ci_pipeline_id 41729035 41729035
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variant iast iast

Summary

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

scenario Δ mean http_req_duration Δ mean throughput candidate mean http_req_duration candidate mean throughput baseline mean http_req_duration baseline mean throughput
scenario:load:petclinic:profiling worse
[+31.978µs; +86.309µs] or [+2.182%; +5.890%]
unstable
[-689.626op/s; +443.472op/s] or [-21.551%; +13.858%]
1.525ms 3076.923op/s 1.465ms 3200.000op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.39.0-SNAPSHOT~96dcbbe614, baseline=1.39.0-SNAPSHOT~4c58087c38
    dateFormat X
    axisFormat %s
section baseline
no_agent (382.021 µs) : 360, 404
.   : milestone, 382,
iast (484.103 µs) : 463, 506
.   : milestone, 484,
iast_FULL (547.733 µs) : 525, 570
.   : milestone, 548,
iast_GLOBAL (508.253 µs) : 486, 531
.   : milestone, 508,
iast_HARDCODED_SECRET_DISABLED (473.589 µs) : 453, 494
.   : milestone, 474,
iast_INACTIVE (454.266 µs) : 432, 477
.   : milestone, 454,
iast_TELEMETRY_OFF (469.527 µs) : 448, 491
.   : milestone, 470,
tracing (433.842 µs) : 414, 454
.   : milestone, 434,
section candidate
no_agent (366.709 µs) : 347, 386
.   : milestone, 367,
iast (482.379 µs) : 461, 504
.   : milestone, 482,
iast_FULL (548.743 µs) : 528, 570
.   : milestone, 549,
iast_GLOBAL (501.257 µs) : 480, 522
.   : milestone, 501,
iast_HARDCODED_SECRET_DISABLED (478.823 µs) : 458, 500
.   : milestone, 479,
iast_INACTIVE (450.079 µs) : 428, 472
.   : milestone, 450,
iast_TELEMETRY_OFF (476.983 µs) : 455, 499
.   : milestone, 477,
tracing (434.953 µs) : 415, 455
.   : milestone, 435,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 382.021 µs [360.293 µs, 403.749 µs] -
iast 484.103 µs [462.562 µs, 505.643 µs] 102.081 µs (26.7%)
iast_FULL 547.733 µs [525.387 µs, 570.079 µs] 165.712 µs (43.4%)
iast_GLOBAL 508.253 µs [485.755 µs, 530.75 µs] 126.232 µs (33.0%)
iast_HARDCODED_SECRET_DISABLED 473.589 µs [452.835 µs, 494.343 µs] 91.568 µs (24.0%)
iast_INACTIVE 454.266 µs [431.896 µs, 476.636 µs] 72.245 µs (18.9%)
iast_TELEMETRY_OFF 469.527 µs [448.299 µs, 490.755 µs] 87.506 µs (22.9%)
tracing 433.842 µs [413.764 µs, 453.92 µs] 51.821 µs (13.6%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 366.709 µs [347.361 µs, 386.057 µs] -
iast 482.379 µs [460.799 µs, 503.959 µs] 115.67 µs (31.5%)
iast_FULL 548.743 µs [527.651 µs, 569.835 µs] 182.034 µs (49.6%)
iast_GLOBAL 501.257 µs [480.162 µs, 522.353 µs] 134.548 µs (36.7%)
iast_HARDCODED_SECRET_DISABLED 478.823 µs [457.581 µs, 500.065 µs] 112.114 µs (30.6%)
iast_INACTIVE 450.079 µs [427.931 µs, 472.228 µs] 83.37 µs (22.7%)
iast_TELEMETRY_OFF 476.983 µs [454.726 µs, 499.239 µs] 110.274 µs (30.1%)
tracing 434.953 µs [414.525 µs, 455.381 µs] 68.244 µs (18.6%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.39.0-SNAPSHOT~96dcbbe614, baseline=1.39.0-SNAPSHOT~4c58087c38
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.336 ms) : 1317, 1355
.   : milestone, 1336,
appsec (1.726 ms) : 1701, 1751
.   : milestone, 1726,
appsec_no_iast (1.723 ms) : 1699, 1747
.   : milestone, 1723,
iast (1.485 ms) : 1462, 1507
.   : milestone, 1485,
profiling (1.465 ms) : 1441, 1490
.   : milestone, 1465,
tracing (1.458 ms) : 1433, 1483
.   : milestone, 1458,
section candidate
no_agent (1.328 ms) : 1309, 1347
.   : milestone, 1328,
appsec (1.721 ms) : 1698, 1744
.   : milestone, 1721,
appsec_no_iast (1.709 ms) : 1685, 1733
.   : milestone, 1709,
iast (1.467 ms) : 1445, 1489
.   : milestone, 1467,
profiling (1.525 ms) : 1499, 1550
.   : milestone, 1525,
tracing (1.443 ms) : 1419, 1468
.   : milestone, 1443,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.336 ms [1.317 ms, 1.355 ms] -
appsec 1.726 ms [1.701 ms, 1.751 ms] 390.034 µs (29.2%)
appsec_no_iast 1.723 ms [1.699 ms, 1.747 ms] 387.272 µs (29.0%)
iast 1.485 ms [1.462 ms, 1.507 ms] 148.619 µs (11.1%)
profiling 1.465 ms [1.441 ms, 1.49 ms] 129.425 µs (9.7%)
tracing 1.458 ms [1.433 ms, 1.483 ms] 122.257 µs (9.2%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.328 ms [1.309 ms, 1.347 ms] -
appsec 1.721 ms [1.698 ms, 1.744 ms] 392.593 µs (29.6%)
appsec_no_iast 1.709 ms [1.685 ms, 1.733 ms] 380.362 µs (28.6%)
iast 1.467 ms [1.445 ms, 1.489 ms] 138.794 µs (10.4%)
profiling 1.525 ms [1.499 ms, 1.55 ms] 196.171 µs (14.8%)
tracing 1.443 ms [1.419 ms, 1.468 ms] 114.833 µs (8.6%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mtoff/otel-sdk-attributes
git_commit_date 1723583620 1723621237
git_commit_sha 4c58087 96dcbbe
release_version 1.39.0-SNAPSHOT~4c58087c38 1.39.0-SNAPSHOT~96dcbbe614
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1723623194 1723623194
ci_job_id 604496170 604496170
ci_pipeline_id 41729035 41729035
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
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.39.0-SNAPSHOT~96dcbbe614, baseline=1.39.0-SNAPSHOT~4c58087c38
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.453 ms) : 1442, 1464
.   : milestone, 1453,
appsec (2.213 ms) : 2178, 2248
.   : milestone, 2213,
iast (1.951 ms) : 1910, 1992
.   : milestone, 1951,
iast_GLOBAL (2.007 ms) : 1965, 2049
.   : milestone, 2007,
profiling (1.841 ms) : 1807, 1876
.   : milestone, 1841,
tracing (1.836 ms) : 1803, 1868
.   : milestone, 1836,
section candidate
no_agent (1.455 ms) : 1444, 1466
.   : milestone, 1455,
appsec (2.213 ms) : 2178, 2248
.   : milestone, 2213,
iast (1.957 ms) : 1916, 1999
.   : milestone, 1957,
iast_GLOBAL (2.003 ms) : 1961, 2046
.   : milestone, 2003,
profiling (1.852 ms) : 1817, 1887
.   : milestone, 1852,
tracing (1.828 ms) : 1795, 1860
.   : milestone, 1828,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.453 ms [1.442 ms, 1.464 ms] -
appsec 2.213 ms [2.178 ms, 2.248 ms] 759.668 µs (52.3%)
iast 1.951 ms [1.91 ms, 1.992 ms] 497.905 µs (34.3%)
iast_GLOBAL 2.007 ms [1.965 ms, 2.049 ms] 553.95 µs (38.1%)
profiling 1.841 ms [1.807 ms, 1.876 ms] 388.369 µs (26.7%)
tracing 1.836 ms [1.803 ms, 1.868 ms] 382.449 µs (26.3%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.455 ms [1.444 ms, 1.466 ms] -
appsec 2.213 ms [2.178 ms, 2.248 ms] 758.136 µs (52.1%)
iast 1.957 ms [1.916 ms, 1.999 ms] 502.341 µs (34.5%)
iast_GLOBAL 2.003 ms [1.961 ms, 2.046 ms] 548.295 µs (37.7%)
profiling 1.852 ms [1.817 ms, 1.887 ms] 397.275 µs (27.3%)
tracing 1.828 ms [1.795 ms, 1.86 ms] 372.605 µs (25.6%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.39.0-SNAPSHOT~96dcbbe614, baseline=1.39.0-SNAPSHOT~4c58087c38
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.841 s) : 14841000, 14841000
.   : milestone, 14841000,
appsec (15.013 s) : 15013000, 15013000
.   : milestone, 15013000,
iast (18.646 s) : 18646000, 18646000
.   : milestone, 18646000,
iast_GLOBAL (17.913 s) : 17913000, 17913000
.   : milestone, 17913000,
profiling (15.293 s) : 15293000, 15293000
.   : milestone, 15293000,
tracing (15.1 s) : 15100000, 15100000
.   : milestone, 15100000,
section candidate
no_agent (15.022 s) : 15022000, 15022000
.   : milestone, 15022000,
appsec (15.352 s) : 15352000, 15352000
.   : milestone, 15352000,
iast (18.593 s) : 18593000, 18593000
.   : milestone, 18593000,
iast_GLOBAL (17.834 s) : 17834000, 17834000
.   : milestone, 17834000,
profiling (15.302 s) : 15302000, 15302000
.   : milestone, 15302000,
tracing (14.924 s) : 14924000, 14924000
.   : milestone, 14924000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.841 s [14.841 s, 14.841 s] -
appsec 15.013 s [15.013 s, 15.013 s] 172.0 ms (1.2%)
iast 18.646 s [18.646 s, 18.646 s] 3.805 s (25.6%)
iast_GLOBAL 17.913 s [17.913 s, 17.913 s] 3.072 s (20.7%)
profiling 15.293 s [15.293 s, 15.293 s] 452.0 ms (3.0%)
tracing 15.1 s [15.1 s, 15.1 s] 259.0 ms (1.7%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.022 s [15.022 s, 15.022 s] -
appsec 15.352 s [15.352 s, 15.352 s] 330.0 ms (2.2%)
iast 18.593 s [18.593 s, 18.593 s] 3.571 s (23.8%)
iast_GLOBAL 17.834 s [17.834 s, 17.834 s] 2.812 s (18.7%)
profiling 15.302 s [15.302 s, 15.302 s] 280.0 ms (1.9%)
tracing 14.924 s [14.924 s, 14.924 s] -98.0 ms (-0.7%)

import datadog.trace.bootstrap.instrumentation.api.OtelSDKAttribute;
import java.util.List;

public class AttributesUtils {
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than introduce a new class, we could put this static method in OtelConventions along with the other methods that convert OpenTelemetry values to Datadog instances.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the tip - did not know OtelConventions existed!

@mtoffl01 mtoffl01 marked this pull request as ready for review August 8, 2024 18:31
@mtoffl01 mtoffl01 requested review from a team as code owners August 8, 2024 18:31
@mtoffl01 mtoffl01 marked this pull request as draft August 8, 2024 18:34
@PerfectSlayer PerfectSlayer added comp: core Tracer core tag: no release notes Changes to exclude from release notes type: refactoring labels Aug 9, 2024
@mtoffl01 mtoffl01 marked this pull request as ready for review August 9, 2024 13:59
Copy link
Contributor

@PerfectSlayer PerfectSlayer left a comment

Choose a reason for hiding this comment

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

I know we discussed it but seeing it implemented, I wonder if the AgentSpanAttributes interface would not be better as a nested interface of AgentSpan: AgentSpan.Attributes?

It feels weird to have AgentSpanAttributes added to span links and (soon) span events where Attributes could make more sense. WDYT?

@@ -224,4 +227,47 @@ private static String getStringAttribute(AgentSpan span, String key) {
}
return (String) tag;
}

public static AgentSpanAttributes convertAttributes(
io.opentelemetry.api.common.Attributes attributes) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You should be able to use import instead of the fully qualified class name

Copy link
Contributor

@PerfectSlayer PerfectSlayer left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍
I pushed changes related to your Javadoc link question and imports.

@mtoffl01 mtoffl01 merged commit d37fbd5 into master Aug 14, 2024
80 checks passed
@mtoffl01 mtoffl01 deleted the mtoff/otel-sdk-attributes branch August 14, 2024 14:59
@github-actions github-actions bot added this to the 1.39.0 milestone Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: core Tracer core tag: no release notes Changes to exclude from release notes type: refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants