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

Do not abort CI Visibility spans dispatch on interrupt #6926

Conversation

nikita-tkachenko-datadog
Copy link
Contributor

@nikita-tkachenko-datadog nikita-tkachenko-datadog commented Apr 17, 2024

What Does This Do

Updates utility method that executes (and retries, if necessary) an HTTP request.
The method is used exclusively by CI Visibility logic that sends spans to the backend.

Motivation

When a child JVM that was forked for tests execution finishes its work, the build system shuts the process down.
As part of this shutdown the tracer threads receive interrupts.
It is possible that when these interrupts are received some tests spans are still being dispatched.
Acting on interrupt results in these spans being lost.

Additional Notes

The logic is updated in a way that an interrupted request will be reattempted.
If an interrupt is received at any point during request execution, the thread's interrupted flag is restored on method exit.

Jira ticket: CIVIS-9801

@nikita-tkachenko-datadog nikita-tkachenko-datadog added type: bug comp: ci visibility Continuous Integration Visibility labels Apr 17, 2024
@nikita-tkachenko-datadog nikita-tkachenko-datadog marked this pull request as ready for review April 17, 2024 10:52
@nikita-tkachenko-datadog nikita-tkachenko-datadog requested a review from a team as a code owner April 17, 2024 10:52
@pr-commenter
Copy link

pr-commenter bot commented Apr 17, 2024

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master nikita-tkachenko/do-not-abort-spans-dispatch-on-interrupt
git_commit_date 1713358531 1713358273
git_commit_sha 91854ff 1ec21aa
release_version 1.33.0-SNAPSHOT~91854ffed0 1.33.0-SNAPSHOT~1ec21aadbc
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1713361129 1713361129
ci_job_id 489139875 489139875
ci_pipeline_id 32300856 32300856
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 0 performance regressions! Performance is the same for 51 metrics, 12 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.33.0-SNAPSHOT~1ec21aadbc, baseline=1.33.0-SNAPSHOT~91854ffed0

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.074 s) : 0, 1073718
Total [baseline] (8.546 s) : 0, 8545576
Agent [candidate] (1.075 s) : 0, 1074669
Total [candidate] (8.544 s) : 0, 8544000
section iast
Agent [baseline] (1.198 s) : 0, 1197659
Total [baseline] (9.018 s) : 0, 9017683
Agent [candidate] (1.215 s) : 0, 1215156
Total [candidate] (9.042 s) : 0, 9041511
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.206 s) : 0, 1205983
Total [baseline] (9.013 s) : 0, 9013192
Agent [candidate] (1.207 s) : 0, 1207005
Total [candidate] (9.02 s) : 0, 9019848
section iast_TELEMETRY_OFF
Agent [baseline] (1.195 s) : 0, 1195287
Total [baseline] (9.0 s) : 0, 9000473
Agent [candidate] (1.197 s) : 0, 1197262
Total [candidate] (9.012 s) : 0, 9011856
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.074 s -
Agent iast 1.198 s 123.941 ms (11.5%)
Agent iast_HARDCODED_SECRET_DISABLED 1.206 s 132.265 ms (12.3%)
Agent iast_TELEMETRY_OFF 1.195 s 121.569 ms (11.3%)
Total tracing 8.546 s -
Total iast 9.018 s 472.107 ms (5.5%)
Total iast_HARDCODED_SECRET_DISABLED 9.013 s 467.616 ms (5.5%)
Total iast_TELEMETRY_OFF 9.0 s 454.897 ms (5.3%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.075 s -
Agent iast 1.215 s 140.487 ms (13.1%)
Agent iast_HARDCODED_SECRET_DISABLED 1.207 s 132.336 ms (12.3%)
Agent iast_TELEMETRY_OFF 1.197 s 122.594 ms (11.4%)
Total tracing 8.544 s -
Total iast 9.042 s 497.51 ms (5.8%)
Total iast_HARDCODED_SECRET_DISABLED 9.02 s 475.847 ms (5.6%)
Total iast_TELEMETRY_OFF 9.012 s 467.856 ms (5.5%)
gantt
    title insecure-bank - break down per module: candidate=1.33.0-SNAPSHOT~1ec21aadbc, baseline=1.33.0-SNAPSHOT~91854ffed0

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (672.503 ms) : 0, 672503
BytebuddyAgent [candidate] (672.954 ms) : 0, 672954
GlobalTracer [baseline] (309.512 ms) : 0, 309512
GlobalTracer [candidate] (309.539 ms) : 0, 309539
AppSec [baseline] (49.16 ms) : 0, 49160
AppSec [candidate] (49.519 ms) : 0, 49519
Remote Config [baseline] (655.605 µs) : 0, 656
Remote Config [candidate] (657.286 µs) : 0, 657
Telemetry [baseline] (7.547 ms) : 0, 7547
Telemetry [candidate] (7.648 ms) : 0, 7648
section iast
BytebuddyAgent [baseline] (793.403 ms) : 0, 793403
BytebuddyAgent [candidate] (806.458 ms) : 0, 806458
GlobalTracer [baseline] (287.747 ms) : 0, 287747
GlobalTracer [candidate] (291.778 ms) : 0, 291778
AppSec [baseline] (48.046 ms) : 0, 48046
AppSec [candidate] (51.055 ms) : 0, 51055
IAST [baseline] (25.478 ms) : 0, 25478
IAST [candidate] (23.447 ms) : 0, 23447
Remote Config [baseline] (567.268 µs) : 0, 567
Remote Config [candidate] (589.656 µs) : 0, 590
Telemetry [baseline] (8.137 ms) : 0, 8137
Telemetry [candidate] (6.758 ms) : 0, 6758
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (799.03 ms) : 0, 799030
BytebuddyAgent [candidate] (800.775 ms) : 0, 800775
GlobalTracer [baseline] (289.604 ms) : 0, 289604
GlobalTracer [candidate] (290.045 ms) : 0, 290045
AppSec [baseline] (50.734 ms) : 0, 50734
AppSec [candidate] (51.65 ms) : 0, 51650
IAST [baseline] (24.037 ms) : 0, 24037
IAST [candidate] (22.01 ms) : 0, 22010
Remote Config [baseline] (595.458 µs) : 0, 595
Remote Config [candidate] (561.883 µs) : 0, 562
Telemetry [baseline] (7.41 ms) : 0, 7410
Telemetry [candidate] (7.336 ms) : 0, 7336
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (791.313 ms) : 0, 791313
BytebuddyAgent [candidate] (793.095 ms) : 0, 793095
GlobalTracer [baseline] (288.147 ms) : 0, 288147
GlobalTracer [candidate] (288.475 ms) : 0, 288475
AppSec [baseline] (49.496 ms) : 0, 49496
AppSec [candidate] (50.183 ms) : 0, 50183
IAST [baseline] (23.317 ms) : 0, 23317
IAST [candidate] (23.881 ms) : 0, 23881
Remote Config [baseline] (583.26 µs) : 0, 583
Remote Config [candidate] (577.863 µs) : 0, 578
Telemetry [baseline] (8.047 ms) : 0, 8047
Telemetry [candidate] (6.598 ms) : 0, 6598
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.33.0-SNAPSHOT~1ec21aadbc, baseline=1.33.0-SNAPSHOT~91854ffed0

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.082 s) : 0, 1081506
Total [baseline] (10.379 s) : 0, 10378589
Agent [candidate] (1.074 s) : 0, 1073608
Total [candidate] (10.305 s) : 0, 10304926
section appsec
Agent [baseline] (1.195 s) : 0, 1194717
Total [baseline] (10.488 s) : 0, 10487798
Agent [candidate] (1.196 s) : 0, 1195828
Total [candidate] (10.533 s) : 0, 10533215
section iast
Agent [baseline] (1.2 s) : 0, 1200383
Total [baseline] (10.746 s) : 0, 10746051
Agent [candidate] (1.207 s) : 0, 1206891
Total [candidate] (10.813 s) : 0, 10812664
section profiling
Agent [baseline] (1.271 s) : 0, 1270942
Total [baseline] (10.586 s) : 0, 10585948
Agent [candidate] (1.268 s) : 0, 1268465
Total [candidate] (10.619 s) : 0, 10619253
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.082 s -
Agent appsec 1.195 s 113.211 ms (10.5%)
Agent iast 1.2 s 118.877 ms (11.0%)
Agent profiling 1.271 s 189.436 ms (17.5%)
Total tracing 10.379 s -
Total appsec 10.488 s 109.21 ms (1.1%)
Total iast 10.746 s 367.462 ms (3.5%)
Total profiling 10.586 s 207.359 ms (2.0%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.074 s -
Agent appsec 1.196 s 122.221 ms (11.4%)
Agent iast 1.207 s 133.283 ms (12.4%)
Agent profiling 1.268 s 194.857 ms (18.1%)
Total tracing 10.305 s -
Total appsec 10.533 s 228.289 ms (2.2%)
Total iast 10.813 s 507.739 ms (4.9%)
Total profiling 10.619 s 314.327 ms (3.1%)
gantt
    title petclinic - break down per module: candidate=1.33.0-SNAPSHOT~1ec21aadbc, baseline=1.33.0-SNAPSHOT~91854ffed0

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (677.481 ms) : 0, 677481
BytebuddyAgent [candidate] (672.169 ms) : 0, 672169
GlobalTracer [baseline] (311.713 ms) : 0, 311713
GlobalTracer [candidate] (309.533 ms) : 0, 309533
AppSec [baseline] (49.503 ms) : 0, 49503
AppSec [candidate] (49.367 ms) : 0, 49367
Remote Config [baseline] (668.116 µs) : 0, 668
Remote Config [candidate] (658.389 µs) : 0, 658
Telemetry [baseline] (7.595 ms) : 0, 7595
Telemetry [candidate] (7.526 ms) : 0, 7526
section appsec
BytebuddyAgent [baseline] (699.395 ms) : 0, 699395
BytebuddyAgent [candidate] (701.235 ms) : 0, 701235
GlobalTracer [baseline] (292.864 ms) : 0, 292864
GlobalTracer [candidate] (292.282 ms) : 0, 292282
AppSec [baseline] (149.966 ms) : 0, 149966
AppSec [candidate] (149.939 ms) : 0, 149939
IAST [baseline] (19.067 ms) : 0, 19067
IAST [candidate] (18.956 ms) : 0, 18956
Remote Config [baseline] (627.127 µs) : 0, 627
Remote Config [candidate] (626.63 µs) : 0, 627
Telemetry [baseline] (7.561 ms) : 0, 7561
Telemetry [candidate] (7.561 ms) : 0, 7561
section iast
BytebuddyAgent [baseline] (796.805 ms) : 0, 796805
BytebuddyAgent [candidate] (799.979 ms) : 0, 799979
GlobalTracer [baseline] (288.139 ms) : 0, 288139
GlobalTracer [candidate] (290.297 ms) : 0, 290297
AppSec [baseline] (49.412 ms) : 0, 49412
AppSec [candidate] (50.548 ms) : 0, 50548
IAST [baseline] (24.514 ms) : 0, 24514
IAST [candidate] (24.167 ms) : 0, 24167
Remote Config [baseline] (570.749 µs) : 0, 571
Remote Config [candidate] (592.598 µs) : 0, 593
Telemetry [baseline] (6.626 ms) : 0, 6626
Telemetry [candidate] (6.679 ms) : 0, 6679
section profiling
BytebuddyAgent [baseline] (677.609 ms) : 0, 677609
BytebuddyAgent [candidate] (677.157 ms) : 0, 677157
GlobalTracer [baseline] (381.79 ms) : 0, 381790
GlobalTracer [candidate] (380.812 ms) : 0, 380812
AppSec [baseline] (50.422 ms) : 0, 50422
AppSec [candidate] (50.036 ms) : 0, 50036
Remote Config [baseline] (723.602 µs) : 0, 724
Remote Config [candidate] (701.487 µs) : 0, 701
Telemetry [baseline] (7.512 ms) : 0, 7512
Telemetry [candidate] (7.483 ms) : 0, 7483
ProfilingAgent [baseline] (96.717 ms) : 0, 96717
ProfilingAgent [candidate] (95.905 ms) : 0, 95905
Profiling [baseline] (96.741 ms) : 0, 96741
Profiling [candidate] (95.929 ms) : 0, 95929
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-04-17T13:09:31 2024-04-17T13:16:17
git_branch master nikita-tkachenko/do-not-abort-spans-dispatch-on-interrupt
git_commit_date 1713358531 1713358273
git_commit_sha 91854ff 1ec21aa
release_version 1.33.0-SNAPSHOT~91854ffed0 1.33.0-SNAPSHOT~1ec21aadbc
start_time 2024-04-17T13:09:18 2024-04-17T13:16:05
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1713360121 1713360121
ci_job_id 489139876 489139876
ci_pipeline_id 32300856 32300856
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 0 performance regressions! Performance is the same for 12 metrics, 16 unstable metrics.

Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.33.0-SNAPSHOT~1ec21aadbc, baseline=1.33.0-SNAPSHOT~91854ffed0
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.34 ms) : 1321, 1359
.   : milestone, 1340,
appsec (1.717 ms) : 1693, 1741
.   : milestone, 1717,
appsec_no_iast (1.722 ms) : 1698, 1746
.   : milestone, 1722,
iast (1.492 ms) : 1470, 1514
.   : milestone, 1492,
profiling (1.49 ms) : 1464, 1515
.   : milestone, 1490,
tracing (1.482 ms) : 1459, 1506
.   : milestone, 1482,
section candidate
no_agent (1.34 ms) : 1321, 1359
.   : milestone, 1340,
appsec (1.734 ms) : 1710, 1758
.   : milestone, 1734,
appsec_no_iast (1.711 ms) : 1687, 1735
.   : milestone, 1711,
iast (1.519 ms) : 1497, 1542
.   : milestone, 1519,
profiling (1.492 ms) : 1467, 1517
.   : milestone, 1492,
tracing (1.479 ms) : 1454, 1503
.   : milestone, 1479,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.34 ms [1.321 ms, 1.359 ms] -
appsec 1.717 ms [1.693 ms, 1.741 ms] 377.204 µs (28.2%)
appsec_no_iast 1.722 ms [1.698 ms, 1.746 ms] 382.371 µs (28.5%)
iast 1.492 ms [1.47 ms, 1.514 ms] 152.41 µs (11.4%)
profiling 1.49 ms [1.464 ms, 1.515 ms] 149.828 µs (11.2%)
tracing 1.482 ms [1.459 ms, 1.506 ms] 142.404 µs (10.6%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.34 ms [1.321 ms, 1.359 ms] -
appsec 1.734 ms [1.71 ms, 1.758 ms] 394.053 µs (29.4%)
appsec_no_iast 1.711 ms [1.687 ms, 1.735 ms] 371.19 µs (27.7%)
iast 1.519 ms [1.497 ms, 1.542 ms] 179.474 µs (13.4%)
profiling 1.492 ms [1.467 ms, 1.517 ms] 152.632 µs (11.4%)
tracing 1.479 ms [1.454 ms, 1.503 ms] 139.161 µs (10.4%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.33.0-SNAPSHOT~1ec21aadbc, baseline=1.33.0-SNAPSHOT~91854ffed0
    dateFormat X
    axisFormat %s
section baseline
no_agent (366.626 µs) : 347, 386
.   : milestone, 367,
iast (472.042 µs) : 451, 493
.   : milestone, 472,
iast_FULL (536.372 µs) : 515, 558
.   : milestone, 536,
iast_GLOBAL (487.975 µs) : 468, 508
.   : milestone, 488,
iast_HARDCODED_SECRET_DISABLED (468.808 µs) : 448, 490
.   : milestone, 469,
iast_INACTIVE (436.512 µs) : 416, 457
.   : milestone, 437,
iast_TELEMETRY_OFF (472.532 µs) : 451, 494
.   : milestone, 473,
tracing (429.694 µs) : 410, 450
.   : milestone, 430,
section candidate
no_agent (363.845 µs) : 344, 384
.   : milestone, 364,
iast (469.081 µs) : 448, 490
.   : milestone, 469,
iast_FULL (534.938 µs) : 514, 556
.   : milestone, 535,
iast_GLOBAL (495.546 µs) : 474, 517
.   : milestone, 496,
iast_HARDCODED_SECRET_DISABLED (468.121 µs) : 447, 489
.   : milestone, 468,
iast_INACTIVE (441.146 µs) : 420, 462
.   : milestone, 441,
iast_TELEMETRY_OFF (468.704 µs) : 448, 489
.   : milestone, 469,
tracing (433.796 µs) : 414, 454
.   : milestone, 434,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 366.626 µs [347.303 µs, 385.949 µs] -
iast 472.042 µs [451.066 µs, 493.017 µs] 105.415 µs (28.8%)
iast_FULL 536.372 µs [515.243 µs, 557.5 µs] 169.746 µs (46.3%)
iast_GLOBAL 487.975 µs [467.574 µs, 508.375 µs] 121.348 µs (33.1%)
iast_HARDCODED_SECRET_DISABLED 468.808 µs [447.644 µs, 489.972 µs] 102.182 µs (27.9%)
iast_INACTIVE 436.512 µs [416.496 µs, 456.527 µs] 69.886 µs (19.1%)
iast_TELEMETRY_OFF 472.532 µs [451.486 µs, 493.578 µs] 105.906 µs (28.9%)
tracing 429.694 µs [409.742 µs, 449.647 µs] 63.068 µs (17.2%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 363.845 µs [343.606 µs, 384.083 µs] -
iast 469.081 µs [447.699 µs, 490.463 µs] 105.237 µs (28.9%)
iast_FULL 534.938 µs [513.936 µs, 555.94 µs] 171.093 µs (47.0%)
iast_GLOBAL 495.546 µs [474.022 µs, 517.071 µs] 131.702 µs (36.2%)
iast_HARDCODED_SECRET_DISABLED 468.121 µs [446.75 µs, 489.493 µs] 104.277 µs (28.7%)
iast_INACTIVE 441.146 µs [420.365 µs, 461.927 µs] 77.301 µs (21.2%)
iast_TELEMETRY_OFF 468.704 µs [448.061 µs, 489.347 µs] 104.86 µs (28.8%)
tracing 433.796 µs [413.865 µs, 453.727 µs] 69.951 µs (19.2%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master nikita-tkachenko/do-not-abort-spans-dispatch-on-interrupt
git_commit_date 1713358531 1713358273
git_commit_sha 91854ff 1ec21aa
release_version 1.33.0-SNAPSHOT~91854ffed0 1.33.0-SNAPSHOT~1ec21aadbc
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1713360772 1713360772
ci_job_id 489139877 489139877
ci_pipeline_id 32300856 32300856
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.33.0-SNAPSHOT~1ec21aadbc, baseline=1.33.0-SNAPSHOT~91854ffed0
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.461 ms) : 1450, 1473
.   : milestone, 1461,
appsec (2.19 ms) : 2156, 2223
.   : milestone, 2190,
iast (1.868 ms) : 1834, 1903
.   : milestone, 1868,
iast_GLOBAL (1.917 ms) : 1881, 1952
.   : milestone, 1917,
profiling (1.846 ms) : 1812, 1880
.   : milestone, 1846,
tracing (1.817 ms) : 1785, 1848
.   : milestone, 1817,
section candidate
no_agent (1.461 ms) : 1449, 1472
.   : milestone, 1461,
appsec (2.194 ms) : 2160, 2228
.   : milestone, 2194,
iast (1.884 ms) : 1849, 1919
.   : milestone, 1884,
iast_GLOBAL (1.92 ms) : 1884, 1955
.   : milestone, 1920,
profiling (1.846 ms) : 1812, 1880
.   : milestone, 1846,
tracing (1.82 ms) : 1789, 1852
.   : milestone, 1820,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.461 ms [1.45 ms, 1.473 ms] -
appsec 2.19 ms [2.156 ms, 2.223 ms] 728.364 µs (49.8%)
iast 1.868 ms [1.834 ms, 1.903 ms] 407.169 µs (27.9%)
iast_GLOBAL 1.917 ms [1.881 ms, 1.952 ms] 455.347 µs (31.2%)
profiling 1.846 ms [1.812 ms, 1.88 ms] 384.422 µs (26.3%)
tracing 1.817 ms [1.785 ms, 1.848 ms] 355.571 µs (24.3%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.461 ms [1.449 ms, 1.472 ms] -
appsec 2.194 ms [2.16 ms, 2.228 ms] 732.809 µs (50.2%)
iast 1.884 ms [1.849 ms, 1.919 ms] 423.026 µs (29.0%)
iast_GLOBAL 1.92 ms [1.884 ms, 1.955 ms] 458.738 µs (31.4%)
profiling 1.846 ms [1.812 ms, 1.88 ms] 385.06 µs (26.4%)
tracing 1.82 ms [1.789 ms, 1.852 ms] 359.416 µs (24.6%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.33.0-SNAPSHOT~1ec21aadbc, baseline=1.33.0-SNAPSHOT~91854ffed0
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.027 s) : 15027000, 15027000
.   : milestone, 15027000,
appsec (15.02 s) : 15020000, 15020000
.   : milestone, 15020000,
iast (18.723 s) : 18723000, 18723000
.   : milestone, 18723000,
iast_GLOBAL (18.12 s) : 18120000, 18120000
.   : milestone, 18120000,
profiling (15.943 s) : 15943000, 15943000
.   : milestone, 15943000,
tracing (14.848 s) : 14848000, 14848000
.   : milestone, 14848000,
section candidate
no_agent (14.991 s) : 14991000, 14991000
.   : milestone, 14991000,
appsec (14.814 s) : 14814000, 14814000
.   : milestone, 14814000,
iast (19.041 s) : 19041000, 19041000
.   : milestone, 19041000,
iast_GLOBAL (17.787 s) : 17787000, 17787000
.   : milestone, 17787000,
profiling (15.048 s) : 15048000, 15048000
.   : milestone, 15048000,
tracing (15.089 s) : 15089000, 15089000
.   : milestone, 15089000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.027 s [15.027 s, 15.027 s] -
appsec 15.02 s [15.02 s, 15.02 s] -7.0 ms (-0.0%)
iast 18.723 s [18.723 s, 18.723 s] 3.696 s (24.6%)
iast_GLOBAL 18.12 s [18.12 s, 18.12 s] 3.093 s (20.6%)
profiling 15.943 s [15.943 s, 15.943 s] 916.0 ms (6.1%)
tracing 14.848 s [14.848 s, 14.848 s] -179.0 ms (-1.2%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.991 s [14.991 s, 14.991 s] -
appsec 14.814 s [14.814 s, 14.814 s] -177.0 ms (-1.2%)
iast 19.041 s [19.041 s, 19.041 s] 4.05 s (27.0%)
iast_GLOBAL 17.787 s [17.787 s, 17.787 s] 2.796 s (18.7%)
profiling 15.048 s [15.048 s, 15.048 s] 57.0 ms (0.4%)
tracing 15.089 s [15.089 s, 15.089 s] 98.0 ms (0.7%)

@PerfectSlayer
Copy link
Contributor

Even if the sendWithRetries method is only use for CI visibility for now, I found it dangerous to be the default behavior.

What about evolving the retry policy object to handle the exception?
Rather than calling shouldRetry(null) on error, we can have a dedicated method boolean shouldRetryWhen(Throwable) where your retry policy can safely ignore interrupted exception (the boolean result can define if the error must be rethrown).

It should allow to have a more generic approach for this kind of behavior. What do you think about it?

@nikita-tkachenko-datadog
Copy link
Contributor Author

Even if the sendWithRetries method is only use for CI visibility for now, I found it dangerous to be the default behavior.

What about evolving the retry policy object to handle the exception? Rather than calling shouldRetry(null) on error, we can have a dedicated method boolean shouldRetryWhen(Throwable) where your retry policy can safely ignore interrupted exception (the boolean result can define if the error must be rethrown).

It should allow to have a more generic approach for this kind of behavior. What do you think about it?

Yes, that makes a lot of sense. I had to change a couple of things to encapsulate interrupts suppression inside the policy

@nikita-tkachenko-datadog nikita-tkachenko-datadog merged commit a1463c6 into master Apr 18, 2024
80 checks passed
@nikita-tkachenko-datadog nikita-tkachenko-datadog deleted the nikita-tkachenko/do-not-abort-spans-dispatch-on-interrupt branch April 18, 2024 09:48
@github-actions github-actions bot added this to the 1.33.0 milestone Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: ci visibility Continuous Integration Visibility type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants