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

Dynamically evaluate service name for message consumers #8088

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

amarziali
Copy link
Collaborator

What Does This Do

If a split-by-jee-deployment is used and the legacy tracing is disabled, the service name for the message consumers spans will be initialized once with the first value it's obtained.

This is not correct since in this case it has to be evaluated every time. This PR forces using a supplier for the service name and evaluates it every time when the decorator is setting the service name. In the general case, it will always returns a constant so it should not impact any performance.

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

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.

@pr-commenter
Copy link

pr-commenter bot commented Dec 13, 2024

Kafka / producer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/messaging-naming-fix
git_commit_date 1734348344 1734424053
git_commit_sha 52aeeec 379790d
See matching parameters
Baseline Candidate
ci_job_date 1734425278 1734425278
ci_job_id 741658896 741658896
ci_pipeline_id 51294739 51294739
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
jdkVersion 11.0.25 11.0.25
jmhVersion 1.36 1.36
jvm /usr/lib/jvm/java-11-openjdk-amd64/bin/java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
jvmArgs -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/producer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/producer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant
vmName OpenJDK 64-Bit Server VM OpenJDK 64-Bit Server VM
vmVersion 11.0.25+9-post-Ubuntu-1ubuntu122.04 11.0.25+9-post-Ubuntu-1ubuntu122.04

Summary

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

See unchanged results
scenario Δ mean throughput
scenario:not-instrumented/KafkaProduceBenchmark.benchProduce same
scenario:only-tracing-dsm-disabled-benchmarks/KafkaProduceBenchmark.benchProduce same
scenario:only-tracing-dsm-enabled-benchmarks/KafkaProduceBenchmark.benchProduce same

@amarziali amarziali force-pushed the andrea.marziali/messaging-naming-fix branch from 446ee9a to 7c58298 Compare December 13, 2024 14:50
@pr-commenter
Copy link

pr-commenter bot commented Dec 13, 2024

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/messaging-naming-fix
git_commit_date 1734386576 1734424053
git_commit_sha 721af2f 379790d
release_version 1.45.0-SNAPSHOT~721af2f5a5 1.45.0-SNAPSHOT~379790dc37
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1734426655 1734426655
ci_job_id 741658892 741658892
ci_pipeline_id 51294739 51294739
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 1 performance improvements and 0 performance regressions! Performance is the same for 55 metrics, 7 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:petclinic:tracing:Remote Config better
[-41.010µs; -15.141µs] or [-5.971%; -2.204%]
658.747µs 686.822µs
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.45.0-SNAPSHOT~379790dc37, baseline=1.45.0-SNAPSHOT~721af2f5a5

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.094 s) : 0, 1094195
Total [baseline] (8.641 s) : 0, 8641401
Agent [candidate] (1.095 s) : 0, 1095354
Total [candidate] (8.644 s) : 0, 8644459
section iast
Agent [baseline] (1.223 s) : 0, 1222977
Total [baseline] (9.255 s) : 0, 9255440
Agent [candidate] (1.234 s) : 0, 1233583
Total [candidate] (9.207 s) : 0, 9206860
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.223 s) : 0, 1223325
Total [baseline] (9.181 s) : 0, 9180901
Agent [candidate] (1.23 s) : 0, 1230441
Total [candidate] (9.198 s) : 0, 9198142
section iast_TELEMETRY_OFF
Agent [baseline] (1.217 s) : 0, 1216993
Total [baseline] (9.18 s) : 0, 9180298
Agent [candidate] (1.22 s) : 0, 1220357
Total [candidate] (9.183 s) : 0, 9182616
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.094 s -
Agent iast 1.223 s 128.783 ms (11.8%)
Agent iast_HARDCODED_SECRET_DISABLED 1.223 s 129.13 ms (11.8%)
Agent iast_TELEMETRY_OFF 1.217 s 122.798 ms (11.2%)
Total tracing 8.641 s -
Total iast 9.255 s 614.039 ms (7.1%)
Total iast_HARDCODED_SECRET_DISABLED 9.181 s 539.5 ms (6.2%)
Total iast_TELEMETRY_OFF 9.18 s 538.896 ms (6.2%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.095 s -
Agent iast 1.234 s 138.229 ms (12.6%)
Agent iast_HARDCODED_SECRET_DISABLED 1.23 s 135.087 ms (12.3%)
Agent iast_TELEMETRY_OFF 1.22 s 125.004 ms (11.4%)
Total tracing 8.644 s -
Total iast 9.207 s 562.401 ms (6.5%)
Total iast_HARDCODED_SECRET_DISABLED 9.198 s 553.684 ms (6.4%)
Total iast_TELEMETRY_OFF 9.183 s 538.157 ms (6.2%)
gantt
    title insecure-bank - break down per module: candidate=1.45.0-SNAPSHOT~379790dc37, baseline=1.45.0-SNAPSHOT~721af2f5a5

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (696.206 ms) : 0, 696206
BytebuddyAgent [candidate] (697.056 ms) : 0, 697056
GlobalTracer [baseline] (317.702 ms) : 0, 317702
GlobalTracer [candidate] (318.603 ms) : 0, 318603
AppSec [baseline] (54.43 ms) : 0, 54430
AppSec [candidate] (54.577 ms) : 0, 54577
Remote Config [baseline] (682.224 µs) : 0, 682
Remote Config [candidate] (673.672 µs) : 0, 674
Telemetry [baseline] (11.389 ms) : 0, 11389
Telemetry [candidate] (10.738 ms) : 0, 10738
section iast
BytebuddyAgent [baseline] (814.538 ms) : 0, 814538
BytebuddyAgent [candidate] (822.281 ms) : 0, 822281
GlobalTracer [baseline] (306.959 ms) : 0, 306959
GlobalTracer [candidate] (309.461 ms) : 0, 309461
AppSec [baseline] (56.929 ms) : 0, 56929
AppSec [candidate] (56.383 ms) : 0, 56383
IAST [baseline] (22.751 ms) : 0, 22751
IAST [candidate] (23.448 ms) : 0, 23448
Remote Config [baseline] (601.697 µs) : 0, 602
Remote Config [candidate] (604.501 µs) : 0, 605
Telemetry [baseline] (7.399 ms) : 0, 7399
Telemetry [candidate] (7.437 ms) : 0, 7437
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (813.684 ms) : 0, 813684
BytebuddyAgent [candidate] (820.446 ms) : 0, 820446
GlobalTracer [baseline] (307.789 ms) : 0, 307789
GlobalTracer [candidate] (308.983 ms) : 0, 308983
AppSec [baseline] (58.581 ms) : 0, 58581
AppSec [candidate] (57.981 ms) : 0, 57981
IAST [baseline] (21.281 ms) : 0, 21281
IAST [candidate] (21.057 ms) : 0, 21057
Remote Config [baseline] (605.779 µs) : 0, 606
Remote Config [candidate] (615.703 µs) : 0, 616
Telemetry [baseline] (7.608 ms) : 0, 7608
Telemetry [candidate] (7.434 ms) : 0, 7434
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (810.766 ms) : 0, 810766
BytebuddyAgent [candidate] (812.165 ms) : 0, 812165
GlobalTracer [baseline] (305.98 ms) : 0, 305980
GlobalTracer [candidate] (307.614 ms) : 0, 307614
AppSec [baseline] (57.659 ms) : 0, 57659
AppSec [candidate] (58.275 ms) : 0, 58275
IAST [baseline] (20.765 ms) : 0, 20765
IAST [candidate] (20.552 ms) : 0, 20552
Remote Config [baseline] (673.41 µs) : 0, 673
Remote Config [candidate] (614.89 µs) : 0, 615
Telemetry [baseline] (7.408 ms) : 0, 7408
Telemetry [candidate] (7.327 ms) : 0, 7327
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.45.0-SNAPSHOT~379790dc37, baseline=1.45.0-SNAPSHOT~721af2f5a5

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.097 s) : 0, 1097322
Total [baseline] (10.444 s) : 0, 10444235
Agent [candidate] (1.095 s) : 0, 1094958
Total [candidate] (10.431 s) : 0, 10431391
section appsec
Agent [baseline] (1.227 s) : 0, 1226785
Total [baseline] (10.717 s) : 0, 10717426
Agent [candidate] (1.229 s) : 0, 1228501
Total [candidate] (10.712 s) : 0, 10712336
section iast
Agent [baseline] (1.22 s) : 0, 1219503
Total [baseline] (10.975 s) : 0, 10974765
Agent [candidate] (1.229 s) : 0, 1229060
Total [candidate] (11.01 s) : 0, 11009862
section profiling
Agent [baseline] (1.318 s) : 0, 1317618
Total [baseline] (10.822 s) : 0, 10821996
Agent [candidate] (1.32 s) : 0, 1320433
Total [candidate] (10.78 s) : 0, 10779681
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.097 s -
Agent appsec 1.227 s 129.464 ms (11.8%)
Agent iast 1.22 s 122.182 ms (11.1%)
Agent profiling 1.318 s 220.296 ms (20.1%)
Total tracing 10.444 s -
Total appsec 10.717 s 273.191 ms (2.6%)
Total iast 10.975 s 530.53 ms (5.1%)
Total profiling 10.822 s 377.761 ms (3.6%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.095 s -
Agent appsec 1.229 s 133.542 ms (12.2%)
Agent iast 1.229 s 134.102 ms (12.2%)
Agent profiling 1.32 s 225.474 ms (20.6%)
Total tracing 10.431 s -
Total appsec 10.712 s 280.944 ms (2.7%)
Total iast 11.01 s 578.471 ms (5.5%)
Total profiling 10.78 s 348.29 ms (3.3%)
gantt
    title petclinic - break down per module: candidate=1.45.0-SNAPSHOT~379790dc37, baseline=1.45.0-SNAPSHOT~721af2f5a5

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (699.762 ms) : 0, 699762
BytebuddyAgent [candidate] (696.545 ms) : 0, 696545
GlobalTracer [baseline] (316.855 ms) : 0, 316855
GlobalTracer [candidate] (318.293 ms) : 0, 318293
AppSec [baseline] (54.756 ms) : 0, 54756
AppSec [candidate] (54.299 ms) : 0, 54299
Remote Config [baseline] (686.822 µs) : 0, 687
Remote Config [candidate] (658.747 µs) : 0, 659
Telemetry [baseline] (11.438 ms) : 0, 11438
Telemetry [candidate] (11.379 ms) : 0, 11379
section appsec
BytebuddyAgent [baseline] (712.293 ms) : 0, 712293
BytebuddyAgent [candidate] (713.71 ms) : 0, 713710
GlobalTracer [baseline] (314.99 ms) : 0, 314990
GlobalTracer [candidate] (315.06 ms) : 0, 315060
AppSec [baseline] (167.221 ms) : 0, 167221
AppSec [candidate] (168.446 ms) : 0, 168446
Remote Config [baseline] (639.987 µs) : 0, 640
Remote Config [candidate] (654.508 µs) : 0, 655
Telemetry [baseline] (8.12 ms) : 0, 8120
Telemetry [candidate] (7.406 ms) : 0, 7406
IAST [baseline] (19.607 ms) : 0, 19607
IAST [candidate] (18.909 ms) : 0, 18909
section iast
BytebuddyAgent [baseline] (812.122 ms) : 0, 812122
BytebuddyAgent [candidate] (816.819 ms) : 0, 816819
GlobalTracer [baseline] (306.369 ms) : 0, 306369
GlobalTracer [candidate] (310.642 ms) : 0, 310642
AppSec [baseline] (57.28 ms) : 0, 57280
AppSec [candidate] (57.508 ms) : 0, 57508
Remote Config [baseline] (626.772 µs) : 0, 627
Remote Config [candidate] (635.331 µs) : 0, 635
Telemetry [baseline] (7.393 ms) : 0, 7393
Telemetry [candidate] (7.508 ms) : 0, 7508
IAST [baseline] (21.996 ms) : 0, 21996
IAST [candidate] (22.113 ms) : 0, 22113
section profiling
BytebuddyAgent [baseline] (689.569 ms) : 0, 689569
BytebuddyAgent [candidate] (689.686 ms) : 0, 689686
GlobalTracer [baseline] (433.224 ms) : 0, 433224
GlobalTracer [candidate] (435.946 ms) : 0, 435946
AppSec [baseline] (53.494 ms) : 0, 53494
AppSec [candidate] (53.804 ms) : 0, 53804
Remote Config [baseline] (670.218 µs) : 0, 670
Remote Config [candidate] (661.668 µs) : 0, 662
Telemetry [baseline] (7.69 ms) : 0, 7690
Telemetry [candidate] (7.736 ms) : 0, 7736
ProfilingAgent [baseline] (93.718 ms) : 0, 93718
ProfilingAgent [candidate] (93.341 ms) : 0, 93341
Profiling [baseline] (93.741 ms) : 0, 93741
Profiling [candidate] (93.365 ms) : 0, 93365
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-12-17T08:41:05 2024-12-17T08:48:05
git_branch master andrea.marziali/messaging-naming-fix
git_commit_date 1734386576 1734424053
git_commit_sha 721af2f 379790d
release_version 1.45.0-SNAPSHOT~721af2f5a5 1.45.0-SNAPSHOT~379790dc37
start_time 2024-12-17T08:40:52 2024-12-17T08:47:51
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1734425637 1734425637
ci_job_id 741658893 741658893
ci_pipeline_id 51294739 51294739
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 11 metrics, 17 unstable metrics.

Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~379790dc37, baseline=1.45.0-SNAPSHOT~721af2f5a5
    dateFormat X
    axisFormat %s
section baseline
no_agent (369.679 µs) : 349, 390
.   : milestone, 370,
iast (490.189 µs) : 468, 512
.   : milestone, 490,
iast_FULL (653.765 µs) : 632, 675
.   : milestone, 654,
iast_GLOBAL (526.207 µs) : 503, 549
.   : milestone, 526,
iast_HARDCODED_SECRET_DISABLED (489.731 µs) : 468, 511
.   : milestone, 490,
iast_INACTIVE (457.002 µs) : 435, 479
.   : milestone, 457,
iast_TELEMETRY_OFF (477.09 µs) : 455, 499
.   : milestone, 477,
tracing (449.671 µs) : 429, 470
.   : milestone, 450,
section candidate
no_agent (375.418 µs) : 355, 395
.   : milestone, 375,
iast (488.169 µs) : 467, 509
.   : milestone, 488,
iast_FULL (657.58 µs) : 636, 679
.   : milestone, 658,
iast_GLOBAL (520.048 µs) : 498, 542
.   : milestone, 520,
iast_HARDCODED_SECRET_DISABLED (495.922 µs) : 474, 517
.   : milestone, 496,
iast_INACTIVE (459.069 µs) : 438, 480
.   : milestone, 459,
iast_TELEMETRY_OFF (477.281 µs) : 456, 499
.   : milestone, 477,
tracing (451.583 µs) : 430, 473
.   : milestone, 452,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 369.679 µs [349.094 µs, 390.265 µs] -
iast 490.189 µs [468.42 µs, 511.959 µs] 120.51 µs (32.6%)
iast_FULL 653.765 µs [632.406 µs, 675.123 µs] 284.085 µs (76.8%)
iast_GLOBAL 526.207 µs [503.462 µs, 548.953 µs] 156.528 µs (42.3%)
iast_HARDCODED_SECRET_DISABLED 489.731 µs [468.422 µs, 511.04 µs] 120.052 µs (32.5%)
iast_INACTIVE 457.002 µs [435.195 µs, 478.81 µs] 87.323 µs (23.6%)
iast_TELEMETRY_OFF 477.09 µs [455.421 µs, 498.759 µs] 107.411 µs (29.1%)
tracing 449.671 µs [428.873 µs, 470.47 µs] 79.992 µs (21.6%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 375.418 µs [355.475 µs, 395.361 µs] -
iast 488.169 µs [466.904 µs, 509.433 µs] 112.751 µs (30.0%)
iast_FULL 657.58 µs [635.968 µs, 679.192 µs] 282.162 µs (75.2%)
iast_GLOBAL 520.048 µs [498.041 µs, 542.055 µs] 144.63 µs (38.5%)
iast_HARDCODED_SECRET_DISABLED 495.922 µs [474.482 µs, 517.361 µs] 120.504 µs (32.1%)
iast_INACTIVE 459.069 µs [437.741 µs, 480.397 µs] 83.651 µs (22.3%)
iast_TELEMETRY_OFF 477.281 µs [455.89 µs, 498.671 µs] 101.863 µs (27.1%)
tracing 451.583 µs [429.821 µs, 473.345 µs] 76.166 µs (20.3%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~379790dc37, baseline=1.45.0-SNAPSHOT~721af2f5a5
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.363 ms) : 1343, 1383
.   : milestone, 1363,
appsec (1.738 ms) : 1714, 1762
.   : milestone, 1738,
appsec_no_iast (1.759 ms) : 1734, 1784
.   : milestone, 1759,
iast (1.5 ms) : 1477, 1523
.   : milestone, 1500,
profiling (1.54 ms) : 1515, 1565
.   : milestone, 1540,
tracing (1.492 ms) : 1467, 1516
.   : milestone, 1492,
section candidate
no_agent (1.344 ms) : 1324, 1364
.   : milestone, 1344,
appsec (1.748 ms) : 1724, 1772
.   : milestone, 1748,
appsec_no_iast (1.698 ms) : 1674, 1722
.   : milestone, 1698,
iast (1.499 ms) : 1477, 1521
.   : milestone, 1499,
profiling (1.525 ms) : 1503, 1548
.   : milestone, 1525,
tracing (1.482 ms) : 1458, 1507
.   : milestone, 1482,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.363 ms [1.343 ms, 1.383 ms] -
appsec 1.738 ms [1.714 ms, 1.762 ms] 375.056 µs (27.5%)
appsec_no_iast 1.759 ms [1.734 ms, 1.784 ms] 396.055 µs (29.1%)
iast 1.5 ms [1.477 ms, 1.523 ms] 136.536 µs (10.0%)
profiling 1.54 ms [1.515 ms, 1.565 ms] 176.89 µs (13.0%)
tracing 1.492 ms [1.467 ms, 1.516 ms] 128.362 µs (9.4%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.344 ms [1.324 ms, 1.364 ms] -
appsec 1.748 ms [1.724 ms, 1.772 ms] 403.734 µs (30.0%)
appsec_no_iast 1.698 ms [1.674 ms, 1.722 ms] 354.12 µs (26.3%)
iast 1.499 ms [1.477 ms, 1.521 ms] 154.635 µs (11.5%)
profiling 1.525 ms [1.503 ms, 1.548 ms] 181.237 µs (13.5%)
tracing 1.482 ms [1.458 ms, 1.507 ms] 137.869 µs (10.3%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/messaging-naming-fix
git_commit_date 1734386576 1734424053
git_commit_sha 721af2f 379790d
release_version 1.45.0-SNAPSHOT~721af2f5a5 1.45.0-SNAPSHOT~379790dc37
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1734426204 1734426204
ci_job_id 741658894 741658894
ci_pipeline_id 51294739 51294739
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.45.0-SNAPSHOT~379790dc37, baseline=1.45.0-SNAPSHOT~721af2f5a5
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.469 ms) : 1457, 1480
.   : milestone, 1469,
appsec (2.341 ms) : 2300, 2382
.   : milestone, 2341,
iast (2.081 ms) : 2028, 2134
.   : milestone, 2081,
iast_GLOBAL (2.122 ms) : 2069, 2175
.   : milestone, 2122,
profiling (1.969 ms) : 1926, 2013
.   : milestone, 1969,
tracing (1.929 ms) : 1889, 1969
.   : milestone, 1929,
section candidate
no_agent (1.468 ms) : 1456, 1479
.   : milestone, 1468,
appsec (2.334 ms) : 2292, 2375
.   : milestone, 2334,
iast (2.079 ms) : 2026, 2131
.   : milestone, 2079,
iast_GLOBAL (2.12 ms) : 2067, 2173
.   : milestone, 2120,
profiling (1.949 ms) : 1907, 1991
.   : milestone, 1949,
tracing (1.92 ms) : 1880, 1960
.   : milestone, 1920,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.469 ms [1.457 ms, 1.48 ms] -
appsec 2.341 ms [2.3 ms, 2.382 ms] 872.248 µs (59.4%)
iast 2.081 ms [2.028 ms, 2.134 ms] 612.27 µs (41.7%)
iast_GLOBAL 2.122 ms [2.069 ms, 2.175 ms] 652.878 µs (44.5%)
profiling 1.969 ms [1.926 ms, 2.013 ms] 500.469 µs (34.1%)
tracing 1.929 ms [1.889 ms, 1.969 ms] 460.258 µs (31.3%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.468 ms [1.456 ms, 1.479 ms] -
appsec 2.334 ms [2.292 ms, 2.375 ms] 865.977 µs (59.0%)
iast 2.079 ms [2.026 ms, 2.131 ms] 611.039 µs (41.6%)
iast_GLOBAL 2.12 ms [2.067 ms, 2.173 ms] 652.127 µs (44.4%)
profiling 1.949 ms [1.907 ms, 1.991 ms] 481.479 µs (32.8%)
tracing 1.92 ms [1.88 ms, 1.96 ms] 452.063 µs (30.8%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~379790dc37, baseline=1.45.0-SNAPSHOT~721af2f5a5
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.615 s) : 15615000, 15615000
.   : milestone, 15615000,
appsec (15.08 s) : 15080000, 15080000
.   : milestone, 15080000,
iast (18.873 s) : 18873000, 18873000
.   : milestone, 18873000,
iast_GLOBAL (17.949 s) : 17949000, 17949000
.   : milestone, 17949000,
profiling (15.177 s) : 15177000, 15177000
.   : milestone, 15177000,
tracing (15.003 s) : 15003000, 15003000
.   : milestone, 15003000,
section candidate
no_agent (15.497 s) : 15497000, 15497000
.   : milestone, 15497000,
appsec (15.141 s) : 15141000, 15141000
.   : milestone, 15141000,
iast (18.734 s) : 18734000, 18734000
.   : milestone, 18734000,
iast_GLOBAL (17.868 s) : 17868000, 17868000
.   : milestone, 17868000,
profiling (15.008 s) : 15008000, 15008000
.   : milestone, 15008000,
tracing (15.299 s) : 15299000, 15299000
.   : milestone, 15299000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.615 s [15.615 s, 15.615 s] -
appsec 15.08 s [15.08 s, 15.08 s] -535.0 ms (-3.4%)
iast 18.873 s [18.873 s, 18.873 s] 3.258 s (20.9%)
iast_GLOBAL 17.949 s [17.949 s, 17.949 s] 2.334 s (14.9%)
profiling 15.177 s [15.177 s, 15.177 s] -438.0 ms (-2.8%)
tracing 15.003 s [15.003 s, 15.003 s] -612.0 ms (-3.9%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.497 s [15.497 s, 15.497 s] -
appsec 15.141 s [15.141 s, 15.141 s] -356.0 ms (-2.3%)
iast 18.734 s [18.734 s, 18.734 s] 3.237 s (20.9%)
iast_GLOBAL 17.868 s [17.868 s, 17.868 s] 2.371 s (15.3%)
profiling 15.008 s [15.008 s, 15.008 s] -489.0 ms (-3.2%)
tracing 15.299 s [15.299 s, 15.299 s] -198.0 ms (-1.3%)

@amarziali amarziali marked this pull request as draft December 13, 2024 14:59
@pr-commenter
Copy link

pr-commenter bot commented Dec 13, 2024

Kafka / consumer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/messaging-naming-fix
git_commit_date 1734348344 1734424053
git_commit_sha 52aeeec 379790d
See matching parameters
Baseline Candidate
ci_job_date 1734425538 1734425538
ci_job_id 741658897 741658897
ci_pipeline_id 51294739 51294739
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
jdkVersion 11.0.25 11.0.25
jmhVersion 1.36 1.36
jvm /usr/lib/jvm/java-11-openjdk-amd64/bin/java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
jvmArgs -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/consumer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/consumer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant
vmName OpenJDK 64-Bit Server VM OpenJDK 64-Bit Server VM
vmVersion 11.0.25+9-post-Ubuntu-1ubuntu122.04 11.0.25+9-post-Ubuntu-1ubuntu122.04

Summary

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

scenario Δ mean throughput
scenario:only-tracing-dsm-disabled-benchmarks/KafkaConsumerBenchmark.benchConsume worse
[-16965.259op/s; -3746.642op/s] or [-5.468%; -1.208%]
See unchanged results
scenario Δ mean throughput
scenario:not-instrumented/KafkaConsumerBenchmark.benchConsume same
scenario:only-tracing-dsm-enabled-benchmarks/KafkaConsumerBenchmark.benchConsume same

@amarziali amarziali force-pushed the andrea.marziali/messaging-naming-fix branch 2 times, most recently from ef7020c to 52979d5 Compare December 16, 2024 15:49
@amarziali amarziali marked this pull request as ready for review December 16, 2024 15:49
@amarziali amarziali force-pushed the andrea.marziali/messaging-naming-fix branch from 52979d5 to 379790d Compare December 17, 2024 08:27
public String get() {
final String contextual = ClassloaderServiceNames.maybeGetForCurrentThread();
if (contextual != null) {
ServiceNameCollector.get().addService(contextual);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not directly related to this PR, but ServiceNameCollector could be made more performant - right now every call to addService can result in a new string being allocated because it lower-cases the keys on insert in order to provide a unique collection of service names from getServices, while retaining the original case.

But ServiceNameCollector.getServices is only called occasionally from the remote-config thread, while addService may be called a lot. So it would be better for ServiceNameCollector to do de-duplication in getServices and keep addService as simple and quick as possible, ideally using putIfAbsent to avoid updating the entry if the key already exists.

If we want to keep the de-duplication on insert then the other option would be to use a ConcurrentSkipListMap with a String.CASE_INSENSITIVE_ORDER comparator.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in #8109

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.

+1 left a comment about improving ServiceNameCollector performance (can be done in a follow-up PR)

@amarziali
Copy link
Collaborator Author

+1 left a comment about improving ServiceNameCollector performance (can be done in a follow-up PR)

Thanks for having suggested next steps. I'm working at that

@amarziali amarziali merged commit a19f73a into master Dec 18, 2024
152 checks passed
@amarziali amarziali deleted the andrea.marziali/messaging-naming-fix branch December 18, 2024 10:29
@github-actions github-actions bot added this to the 1.45.0 milestone Dec 18, 2024
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.

2 participants