8000 Do not prepend DBM <> APM trace comment in SQLCommenter if there is a pg plan hint by edengorevoy · Pull Request #8864 · DataDog/dd-trace-java · GitHub
[go: up one dir, main page]

Skip to content

Do not prepend DBM <> APM trace comment in SQLCommenter if there is a pg plan hint #8864

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

Merged
merged 2 commits into from
May 22, 2025

Conversation

edengorevoy
Copy link
Contributor
@edengorevoy edengorevoy commented May 21, 2025

What Does This Do

SDBM-1727

We have had a few feature requests to support the extension pg_plan_hint. That extension reads the first block comment in the query to grab hints (src). Since we prepend tracer comments by default, the commends inserted for DBM <> APM correlation will break pg_plan_hint which can cause degraded queries and can be a blocker for some customers. These comments have a special opening syntax \*+ which we can use to determine the appending behavior.

Screenshot 2025-05-21 at 2 59 35 PM

Since the hint comment should only appear with the syntax /*+, we can use that identifier to determine that there could be a pg_hint_plan comment in the query and choose to append instead of prepend.

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@edengorevoy edengorevoy requested a review from a team as a code owner May 21, 2025 18:59
Copy link
Contributor
github-actions bot commented May 21, 2025

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 May 21, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master eden.gorevoy/check-for-pg-plan-hint
git_commit_date 1746789389 1747919884
git_commit_sha ad6d5fe e4c3c62
release_version 1.50.0-SNAPSHOT~ad6d5fef42 1.50.0-SNAPSHOT~e4c3c62d9b
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1747922152 1747922152
ci_job_id 950094692 950094692
ci_pipeline_id 65856246 65856246
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-xffk-g1f-project-304-concurrent-0-mkelndmd 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-xffk-g1f-project-304-concurrent-0-mkelndmd 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None
variant iast iast

Summary

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

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:petclinic:profiling:ProfilingAgent better
[-8.842ms; -4.469ms] or [-8.017%; -4.052%]
103.633ms 110.289ms
scenario:startup:petclinic:profiling:GlobalTracer better
[-21.048ms; -17.530ms] or [-5.537%; -4.611%]
360.842ms 380.131ms
scenario:startup:petclinic:profiling:AppSec worse
[+5.737ms; +8.732ms] or [+10.483%; +15.955%]
61.960ms 54.726ms
scenario:startup:petclinic:profiling:Profiling better
[-8.844ms; -4.470ms] or [-8.017%; -4.052%]
103.657ms 110.314ms
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.50.0-SNAPSHOT~e4c3c62d9b, baseline=1.50.0-SNAPSHOT~ad6d5fef42

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.021 s) : 0, 1020916
Total [baseline] (8.643 s) : 0, 8642781
Agent [candidate] (1.031 s) : 0, 1030557
Total [candidate] (8.691 s) : 0, 8690845
section iast
Agent [baseline] (1.151 s) : 0, 1151345
Total [baseline] (9.278 s) : 0, 9278101
Agent [candidate] (1.148 s) : 0, 1148089
Total [candidate] (9.29 s) : 0, 9290060
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.168 s) : 0, 1167699
Total [baseline] (9.269 s) : 0, 9268887
Agent [candidate] (1.15 s) : 0, 1150109
Total [candidate] (9.177 s) : 0, 9176688
section iast_TELEMETRY_OFF
Agent [baseline] (1.153 s) : 0, 1153033
Total [baseline] (9.229 s) : 0, 9229011
Agent [candidate] (1.147 s) : 0, 1147313
Total [candidate] (9.208 s) : 0, 9208332
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.021 s -
Agent iast 1.151 s 130.429 ms (12.8%)
Agent iast_HARDCODED_SECRET_DISABLED 1.168 s 146.783 ms (14.4%)
Agent iast_TELEMETRY_OFF 1.153 s 132.117 ms (12.9%)
Total tracing 8.643 s -
Total iast 9.278 s 635.32 ms (7.4%)
Total iast_HARDCODED_SECRET_DISABLED 9.269 s 626.107 ms (7.2%)
Total iast_TELEMETRY_OFF 9.229 s 586.231 ms (6.8%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.031 s -
Agent iast 1.148 s 117.532 ms (11.4%)
Agent iast_HARDCODED_SECRET_DISABLED 1.15 s 119.552 ms (11.6%)
Agent iast_TELEMETRY_OFF 1.147 s 116.756 ms (11.3%)
Total tracing 8.691 s -
Total iast 9.29 s 599.215 ms (6.9%)
Total iast_HARDCODED_SECRET_DISABLED 9.177 s 485.843 ms (5.6%)
Total iast_TELEMETRY_OFF 9.208 s 517.487 ms (6.0%)
gantt
    title insecure-bank - break down per module: candidate=1.50.0-SNAPSHOT~e4c3c62d9b, baseline=1.50.0-SNAPSHOT~ad6d5fef42

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (683.652 ms) : 0, 683652
BytebuddyAgent [candidate] (690.374 ms) : 0, 690374
GlobalTracer [baseline] (240.271 ms) : 0, 240271
GlobalTracer [candidate] (243.282 ms) : 0, 243282
AppSec [baseline] (54.567 ms) : 0, 54567
AppSec [candidate] (55.35 ms) : 0, 55350
Debugger [baseline] (8.392 ms) : 0, 8392
Debugger [candidate] (7.718 ms) : 0, 7718
Remote Config [baseline] (704.8 µs) : 0, 705
Remote Config [candidate] (738.723 µs) : 0, 739
Telemetry [baseline] (9.839 ms) : 0, 9839
Telemetry [candidate] (9.295 ms) : 0, 9295
section iast
BytebuddyAgent [baseline] (803.873 ms) : 0, 803873
BytebuddyAgent [candidate] (800.877 ms) : 0, 800877
GlobalTracer [baseline] (231.262 ms) : 0, 231262
GlobalTracer [candidate] (230.671 ms) : 0, 230671
AppSec [baseline] (48.71 ms) : 0, 48710
AppSec [candidate] (49.6 ms) : 0, 49600
Debugger [baseline] (5.896 ms) : 0, 5896
Debugger [candidate] (5.913 ms) : 0, 5913
Remote Config [baseline] (591.224 µs) : 0, 591
Remote Config [candidate] (614.621 µs) : 0, 615
Telemetry [baseline] (7.783 ms) : 0, 7783
Telemetry [candidate] (7.871 ms) : 0, 7871
IAST [baseline] (29.72 ms) : 0, 29720
IAST [candidate] (29.146 ms) : 0, 29146
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (815.41 ms) : 0, 815410
BytebuddyAgent [candidate] (802.504 ms) : 0, 802504
GlobalTracer [baseline] (233.93 ms) : 0, 233930
GlobalTracer [candidate] (231.267 ms) : 0, 231267
AppSec [baseline] (51.12 ms) : 0, 51120
AppSec [candidate] (51.738 ms) : 0, 51738
Debugger [baseline] (6.064 ms) : 0, 6064
Debugger [candidate] (5.872 ms) : 0, 5872
Remote Config [baseline] (607.159 µs) : 0, 607
Remote Config [candidate] (596.75 µs) : 0, 597
Telemetry [baseline] (8.101 ms) : 0, 8101
Telemetry [candidate] (7.873 ms) : 0, 7873
IAST [baseline] (28.691 ms) : 0, 28691
IAST [candidate] (26.022 ms) : 0, 26022
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (804.581 ms) : 0, 804581
BytebuddyAgent [candidate] (800.138 ms) : 0, 800138
GlobalTracer [baseline] (232.228 ms) : 0, 232228
GlobalTracer [candidate] (231.085 ms) : 0, 231085
AppSec [baseline] (55.031 ms) : 0, 55031
AppSec [candidate] (55.787 ms) : 0, 55787
Debugger [baseline] (5.959 ms) : 0, 5959
Debugger [candidate] (5.928 ms) : 0, 5928
Remote Config [baseline] (619.091 µs) : 0, 619
Remote Config [candidate] (596.161 µs) : 0, 596
Telemetry [baseline] (7.784 ms) : 0, 7784
Telemetry [candidate] (7.834 ms) : 0, 7834
IAST [baseline] (23.204 ms) : 0, 23204
IAST [candidate] (22.392 ms) : 0, 22392
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.50.0-SNAPSHOT~e4c3c62d9b, baseline=1.50.0-SNAPSHOT~ad6d5fef42

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.032 s) : 0, 1032321
Total [baseline] (10.529 s) : 0, 10529398
Agent [candidate] (1.032 s) : 0, 1032327
Total [candidate] (10.528 s) : 0, 10527881
section appsec
Agent [baseline] (1.165 s) : 0, 1164545
Total [baseline] (10.729 s) : 0, 10728980
Agent [candidate] (1.167 s) : 0, 1166534
Total [candidate] (10.786 s) : 0, 10785824
section iast
Agent [baseline] (1.151 s) : 0, 1151391
Total [baseline] (10.938 s) : 0, 10937837
Agent [candidate] (1.154 s) : 0, 1154394
Total [candidate] (10.991 s) : 0, 10990857
section profiling
Agent [baseline] (1.286 s) : 0, 1286391
Total [baseline] (10.905 s) : 0, 10905368
Agent [candidate] (1.267 s) : 0, 1267444
Total [candidate] (10.893 s) : 0, 10893012
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.032 s -
Agent appsec 1.165 s 132.224 ms (12.8%)
Agent iast 1.151 s 119.07 ms (11.5%)
Agent profiling 1.286 s 254.071 ms (24.6%)
Total tracing 10.529 s -
Total appsec 10.729 s 199.582 ms (1.9%)
Total iast 10.938 s 408.439 ms (3.9%)
Total profiling 10.905 s 375.97 ms (3.6%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.032 s -
Agent appsec 1.167 s 134.208 ms (13.0%)
Agent iast 1.154 s 122.067 ms (11.8%)
Agent profiling 1.267 s 235.117 ms (22.8%)
Total tracing 10.528 s -
Total appsec 10.786 s 257.942 ms (2.5%)
Total iast 10.991 s 462.976 ms (4.4%)
Total profiling 10.893 s 365.13 ms (3.5%)
gantt
    title petclinic - break down per module: candidate=1.50.0-SNAPSHOT~e4c3c62d9b, baseline=1.50.0-SNAPSHOT~ad6d5fef42

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (691.917 ms) : 0, 691917
BytebuddyAgent [candidate] (690.172 ms) : 0, 690172
GlobalTracer [baseline] (243.007 ms) : 0, 243007
GlobalTracer [candidate] (242.814 ms) : 0, 242814
AppSec [baseline] (55.162 ms) : 0, 55162
AppSec [candidate] (55.046 ms) : 0, 55046
Debugger [baseline] (7.795 ms) : 0, 7795
Debugger [candidate] (10.698 ms) : 0, 10698
Remote Config [baseline] (712.925 µs) : 0, 713
Remote Config [candidate] (718.636 µs) : 0, 719
Telemetry [baseline] (9.948 ms) : 0, 9948
Telemetry [candidate] (9.111 ms) : 0, 9111
section appsec
BytebuddyAgent [baseline] (703.158 ms) : 0, 703158
BytebuddyAgent [candidate] (704.114 ms) : 0, 704114
GlobalTracer [baseline] (237.525 ms) : 0, 237525
GlobalTracer [candidate] (237.844 ms) : 0, 237844
AppSec [baseline] (175.028 ms) : 0, 175028
AppSec [candidate] (176.016 ms) : 0, 176016
Debugger [baseline] (6.012 ms) : 0, 6012
Debugger [candidate] (5.952 ms) : 0, 5952
Remote Config [baseline] (630.422 µs) : 0, 630
Remote Config [candidate] (619.99 µs) : 0, 620
Telemetry [baseline] (7.833 ms) : 0, 7833
Telemetry [candidate] (7.416 ms) : 0, 7416
IAST [baseline] (21.554 ms) : 0, 21554
IAST [candidate] (21.979 ms) : 0, 21979
section iast
BytebuddyAgent [baseline] (803.316 ms) : 0, 803316
BytebuddyAgent [candidate] (806.261 ms) : 0, 806261
GlobalTracer [baseline] (231.364 ms) : 0, 231364
GlobalTracer [candidate] (231.887 ms) : 0, 231887
AppSec [baseline] (52.26 ms) : 0, 52260
AppSec [candidate] (47.465 ms) : 0, 47465
Debugger [baseline] (5.871 ms) : 0, 5871
Debugger [candidate] (5.909 ms) : 0, 5909
Remote Config [baseline] (590.125 µs) : 0, 590
Remote Config [candidate] (601.603 µs) : 0, 602
Telemetry [baseline] (7.871 ms) : 0, 7871
Telemetry [candidate] (7.902 ms) : 0, 7902
IAST [baseline] (25.029 ms) : 0, 25029
IAST [candidate] (30.751 ms) : 0, 30751
section profiling
BytebuddyAgent [baseline] (675.585 ms) : 0, 675585
BytebuddyAgent [candidate] (675.044 ms) : 0, 675044
GlobalTracer [baseline] (380.131 ms) : 0, 380131
GlobalTracer [candidate] (360.842 ms) : 0, 360842
AppSec [baseline] (54.726 ms) : 0, 54726
AppSec [candidate] (61.96 ms) : 0, 61960
Debugger [baseline] (6.167 ms) : 0, 6167
Debugger [candidate] (6.246 ms) : 0, 6246
Remote Config [baseline] (658.225 µs) : 0, 658
Remote Config [candidate] (658.362 µs) : 0, 658
Telemetry [baseline] (8.132 ms) : 0, 8132
Telemetry [candidate] (8.207 ms) : 0, 8207
ProfilingAgent [baseline] (110.289 ms) : 0, 110289
ProfilingAgent [candidate] (103.633 ms) : 0, 103633
Profiling [baseline] (110.314 ms) : 0, 110314
Profiling [candidate] (103.657 ms) : 0, 103657
Loading

Load

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master eden.gorevoy/check-for-pg-plan-hint
git_commit_date 1746789389 1747919884
git_commit_sha ad6d5fe e4c3c62
release_version 1.50.0-SNAPSHOT~ad6d5fef42 1.50.0-SNAPSHOT~e4c3c62d9b
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1747921677 1747921677
ci_job_id 950094694 950094694
ci_pipeline_id 65856246 65856246
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-xffk-g1f-project-304-concurrent-1-aewdifbt 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-xffk-g1f-project-304-concurrent-1-aewdifbt 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 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 biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~e4c3c62d9b, baseline=1.50.0-SNAPSHOT~ad6d5fef42
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.488 s) : 15488000, 15488000
.   : milestone, 15488000,
appsec (15.112 s) : 15112000, 15112000
.   : milestone, 15112000,
iast (19.062 s) : 19062000, 19062000
.   : milestone, 19062000,
iast_GLOBAL (18.106 s) : 18106000, 18106000
.   : milestone, 18106000,
profiling (14.895 s) : 14895000, 14895000
.   : milestone, 14895000,
tracing (14.64 s) : 14640000, 14640000
.   : milestone, 14640000,
section candidate
no_agent (15.466 s) : 15466000, 15466000
.   : milestone, 15466000,
appsec (15.11 s) : 15110000, 15110000
.   : milestone, 15110000,
iast (19.198 s) : 19198000, 19198000
.   : milestone, 19198000,
iast_GLOBAL (18.254 s) : 18254000, 18254000
.   : milestone, 18254000,
profiling (15.0 s) : 15000000, 15000000
.   : milestone, 15000000,
tracing (14.882 s) : 14882000, 14882000
.   : milestone, 14882000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.488 s [15.488 s, 15.488 s] -
appsec 15.112 s [15.112 s, 15.112 s] -376.0 ms (-2.4%)
iast 19.062 s [19.062 s, 19.062 s] 3.574 s (23.1%)
iast_GLOBAL 18.106 s [18.106 s, 18.106 s] 2.618 s (16.9%)
profiling 14.895 s [14.895 s, 14.895 s] -593.0 ms (-3.8%)
tracing 14.64 s [14.64 s, 14.64 s] -848.0 ms (-5.5%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.466 s [15.466 s, 15.466 s] -
appsec 15.11 s [15.11 s, 15.11 s] -356.0 ms (-2.3%)
iast 19.198 s [19.198 s, 19.198 s] 3.732 s (24.1%)
iast_GLOBAL 18.254 s [18.254 s, 18.254 s] 2.788 s (18.0%)
profiling 15.0 s [15.0 s, 15.0 s] -466.0 ms (-3.0%)
tracing 14.882 s [14.882 s, 14.882 s] -584.0 ms (-3.8%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~e4c3c62d9b, baseline=1.50.0-SNAPSHOT~ad6d5fef42
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.476 ms) : 1464, 1487
.   : milestone, 1476,
appsec (2.405 ms) : 2356, 2453
.   : milestone, 2405,
iast (2.177 ms) : 2116, 2238
.   : milestone, 2177,
iast_GLOBAL (2.222 ms) : 2161, 2283
.   : milestone, 2222,
profiling (2.041 ms) : 1991, 2090
.   : milestone, 2041,
tracing (2.012 ms) : 1965, 2059
.   : milestone, 2012,
section candidate
no_agent (1.481 ms) : 1470, 1493
.   : milestone, 1481,
appsec (2.403 ms) : 2354, 2451
.   : milestone, 2403,
iast (2.188 ms) : 2127, 2249
.   : milestone, 2188,
iast_GLOBAL (2.222 ms) : 2161, 2283
.   : milestone, 2222,
profiling (2.057 ms) : 2007, 2108
.   : milestone, 2057,
tracing (1.996 ms) : 1950, 2043
.   : milestone, 1996,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.476 ms [1.464 ms, 1.487 ms] -
appsec 2.405 ms [2.356 ms, 2.453 ms] 928.709 µs (62.9%)
iast 2.177 ms [2.116 ms, 2.238 ms] 701.398 µs (47.5%)
iast_GLOBAL 2.222 ms [2.161 ms, 2.283 ms] 745.852 µs (50.5%)
profiling 2.041 ms [1.991 ms, 2.09 ms] 564.984 µs (38.3%)
tracing 2.012 ms [1.965 ms, 2.059 ms] 535.927 µs (36.3%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.481 ms [1.47 ms, 1.493 ms] -
appsec 2.403 ms [2.354 ms, 2.451 ms] 921.604 µs (62.2%)
iast 2.188 ms [2.127 ms, 2.249 ms] 706.835 µs (47.7%)
iast_GLOBAL 2.222 ms [2.161 ms, 2.283 ms] 740.954 µs (50.0%)
profiling 2.057 ms [2.007 ms, 2.108 ms] 576.219 µs (38.9%)
tracing 1.996 ms [1.95 ms, 2.043 ms] 515.33 µs (34.8%)

@edengorevoy edengorevoy changed the title Append comment if there's a pg plan hint Do not prepend DBM <> APM trace comment in SQLComment if there is a pg plan hint May 21, 2025
@edengorevoy edengorevoy changed the title Do not prepend DBM <> APM trace comment in SQLComment if there is a pg plan hint Do not prepend DBM <> APM trace comment in SQLCommenter if there is a pg plan hint May 21, 2025
// invocation but they seem ok with it after so we force append mode
if (firstWord.equalsIgnoreCase("call")) {
appendComment = true;
}

// Append the comment in the case of a pg_hint_plan extension
if (dbType.startsWith("postgres") && containsPgHint(sql)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

is the extension applying systematically that to all the queries? in this case that info can be pinned to the dbInfo once

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The comments are user annotations, it doesn't apply to all queries. The extension will just parse the user's annotation and will miss it if the tracer comment is prepended.

Copy link
Collaborator
@amarziali amarziali 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. you can merge latest master changes to this branch that will fix issues with the muzzle ci task that's failing

@edengorevoy edengorevoy force-pushed the eden.gorevoy/check-for-pg-plan-hint branch from df49db0 to e4c3c62 Compare May 22, 2025 13:18
@edengorevoy
Copy link
Contributor Author

@amarziali thanks for taking a look at this PR! I rebased & re-ran the tests and I think the muzzle task is still failing, is there a known issue about those tests still?

@edengorevoy edengorevoy merged commit d68f8f1 into master May 22, 2025
589 of 591 checks passed
@edengorevoy edengorevoy deleted the eden.gorevoy/check-for-pg-plan-hint branch May 22, 2025 16:08
@github-actions github-actions bot added this to the 1.50.0 milestone May 22, 2025
svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request Jun 20, 2025
| Package | Type | Package file | Manager | Update | Change |
|---|---|---|---|---|---|
| [com.datadoghq:dd-trace-api](https://github.com/datadog/dd-trace-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`1.49.0` -> `1.50.0` |

---

### Release Notes

<details>
<summary>datadog/dd-trace-java (com.datadoghq:dd-trace-api)</summary>

###
[`v1.50.0`](https://github.com/DataDog/dd-trace-java/releases/tag/v1.50.0):
1.50.0

### Deprecation Notice

> \[!NOTE]
> `DD_RUNTIME_ID_ENABLED` has been deprecated and will be removed in
future releases. Please use `DD_RUNTIME_METRICS_RUNTIME_ID_ENABLED`
instead.

### Components

#### Application Security Management (WAF)

- 🐛 Add String length truncation limit to ObjectIntrospector and
update truncation metrics
([#&#8203;8825](DataDog/dd-trace-java#8825) -
[@&#8203;jandro996](https://github.com/jandro996))
- 🐛 Adapt standalone ASM to support API Security
([#&#8203;8804](DataDog/dd-trace-java#8804) -
[@&#8203;jandro996](https://github.com/jandro996))
- ✨ Add appsec.waf.input\_truncated metric
([#&#8203;8791](DataDog/dd-trace-java#8791) -
[@&#8203;jandro996](https://github.com/jandro996))
- ✨ Extended appsec request body collection
([#&#8203;8748](DataDog/dd-trace-java#8748) -
[@&#8203;jandro996](https://github.com/jandro996))
- ✨ Extended appsec request/response headers collection
([#&#8203;8724](DataDog/dd-trace-java#8724) -
[@&#8203;jandro996](https://github.com/jandro996))

#### Build & Tooling

- ✨ Add artifacts to public s3 bucket
([#&#8203;8947](DataDog/dd-trace-java#8947) -
[@&#8203;randomanderson](https://github.com/randomanderson))

#### Continuous Integration Visibility

- ✨ Improve PR information building
([#&#8203;8908](DataDog/dd-trace-java#8908) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- ✨ Truncate span stack traces when Test Optimization is
enabled
([#&#8203;8903](DataDog/dd-trace-java#8903) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🐛 Ensure auto-detected service name is the same for every process
in the same build
([#&#8203;8902](DataDog/dd-trace-java#8902) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🐛 Use tag as fallback in api requests if no branch is available
([#&#8203;8876](DataDog/dd-trace-java#8876) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- ✨ Add support for JUnit 5.13-RC1
([#&#8203;8865](DataDog/dd-trace-java#8865),
[#&#8203;8871](DataDog/dd-trace-java#8871) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- ✨ Implement attempt to fix v3 and v4 and bump capability
version
([#&#8203;8824](DataDog/dd-trace-java#8824) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- 🧹 Align retry logic for all test framework instrumentations
([#&#8203;8803](DataDog/dd-trace-java#8803) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- 🐛 Always build ci workspace without trailing separator
([#&#8203;8788](DataDog/dd-trace-java#8788) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- ✨ Add commit discrepancies telemetry when building repository
git information
([#&#8203;8763](DataDog/dd-trace-java#8763) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))

#### Data Streams Monitoring

- 💡 Surface process tags in dsm payloads and use them for base hash
calculation
([#&#8203;8836](DataDog/dd-trace-java#8836) -
[@&#8203;amarziali](https://github.com/amarziali))

#### Dynamic Instrumentation

- ✨ Optimized allocations for collection filter functions
([#&#8203;8896](DataDog/dd-trace-java#8896) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Fix SymDB upload size check
([#&#8203;8887](DataDog/dd-trace-java#8887) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Add support for Set in filter function
([#&#8203;8873](DataDog/dd-trace-java#8873) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Add support for isDefined in log template
([#&#8203;8859](DataDog/dd-trace-java#8859) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Fix Max captured frames for Exception Replay
([#&#8203;8856](DataDog/dd-trace-java#8856) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Remove static inherited fields collection
([#&#8203;8832](DataDog/dd-trace-java#8832) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 💡 Add process tags to dynamic instrumentation intake payload
([#&#8203;8779](DataDog/dd-trace-java#8779) -
[@&#8203;amarziali](https://github.com/amarziali))

#### GraalVM native-image

- ✨ Add support for GraalVM Native GC metrics
([#&#8203;8913](DataDog/dd-trace-java#8913) -
[@&#8203;ygree](https://github.com/ygree))
- ✨ Add JMXFetch support for GraalVM Native
([#&#8203;8569](DataDog/dd-trace-java#8569) -
[@&#8203;ygree](https://github.com/ygree))

#### JMX fetch

- ✨ Add support for GraalVM Native GC metrics
([#&#8203;8913](DataDog/dd-trace-java#8913) -
[@&#8203;ygree](https://github.com/ygree))

#### Library Injection

- ✨ Deny oracle db jvm based tools
([#&#8203;8909](DataDog/dd-trace-java#8909) -
[@&#8203;bric3](https://github.com/bric3))

#### OpenTracing

- 🐛 Fix OT packaging for exception replay
([#&#8203;8912](DataDog/dd-trace-java#8912) -
[@&#8203;jpbempel](https://github.com/jpbempel))

#### Profiling

- ✨ Bump ddprof to 1.27.0
([#&#8203;8893](DataDog/dd-trace-java#8893) -
[@&#8203;jbachorik](https://github.com/jbachorik))
- Properly handle the adaptive sampling interval overflow by
[@&#8203;jbachorik](https://github.com/jbachorik) in
DataDog/java-profiler#213
- Fix [#&#8203;200](DataDog/dd-trace-java#200)
Crash related to aligned\_alloc and free in context by
[@&#8203;yanglong1010](https://github.com/yanglong1010) in
DataDog/java-profiler#208
- Explicitly initialize empty context page by
[@&#8203;jbachorik](https://github.com/jbachorik) in
DataDog/java-profiler#210
- Re-connect crash recursion protection with VM stackwalker by
[@&#8203;jbachorik](https://github.com/jbachorik) in
DataDog/java-profiler#214
- ✨ Enable ZSTD compression for profiling
([#&#8203;8862](DataDog/dd-trace-java#8862) -
[@&#8203;MattAlp](https://github.com/MattAlp))
- ✨ Extend JPS re-implementation to J9 family
([#&#8203;8813](DataDog/dd-trace-java#8813) -
[@&#8203;MattAlp](https://github.com/MattAlp))
- 💡 Collect process tags for profiling upload requests
([#&#8203;8780](DataDog/dd-trace-java#8780) -
[@&#8203;amarziali](https://github.com/amarziali))

#### Telemetry

- 💡 Surface process tags on telemetry payloads
([#&#8203;8837](DataDog/dd-trace-java#8837) -
[@&#8203;amarziali](https://github.com/amarziali))

#### Trace context propagation

- ✨ Migrating all HttpClient Instrumentations to Inject Full
Context
([#&#8203;8826](DataDog/dd-trace-java#8826) -
[@&#8203;mhlidd](https://github.com/mhlidd))
- ✨ Migrating all HttpServer Instrumentations to Extract full
Context
([#&#8203;8820](DataDog/dd-trace-java#8820) -
[@&#8203;mhlidd](https://github.com/mhlidd))
- ✨ Add context API support OTel propagators
([#&#8203;8770](DataDog/dd-trace-java#8770) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))

#### Tracer core

- ✨⚡ Skip JAXB generated classes classloader
([#&#8203;9003](DataDog/dd-trace-java#9003) -
[@&#8203;bric3](https://github.com/bric3))
- ✨ Add DD\_RUNTIME\_METRICS\_RUNTIME\_ID\_ENABLED alias for
runtime id generation
([#&#8203;8981](DataDog/dd-trace-java#8981) -
[@&#8203;amarziali](https://github.com/amarziali))
- 🐛 Use resolved address for peer.hostname when available without
hitting the cache
([#&#8203;8915](DataDog/dd-trace-java#8915) -
[@&#8203;amarziali](https://github.com/amarziali))
- 💡 Surface server name process tag for tomcat
([#&#8203;8894](DataDog/dd-trace-java#8894) -
[@&#8203;amarziali](https://github.com/amarziali))
- 💡 Surface websphere cell and server name on process tags
([#&#8203;8880](DataDog/dd-trace-java#8880) -
[@&#8203;amarziali](https://github.com/amarziali))
- ✨ Added special lightweight pre-main class that skips
installation on incompatible JVMs.
([#&#8203;8855](DataDog/dd-trace-java#8855) -
[@&#8203;AlexeyKuznetsov-DD](https://github.com/AlexeyKuznetsov-DD))
- 💡 Add entrypoint type to process tags
([#&#8203;8839](DataDog/dd-trace-java#8839) -
[@&#8203;amarziali](https://github.com/amarziali))
- ✨ Extend JPS re-implementation to J9 family
([#&#8203;8813](DataDog/dd-trace-java#8813) -
[@&#8203;MattAlp](https://github.com/MattAlp))
- ✨ Notify listeners when the scope top changes after switching
scope stacks
([#&#8203;8797](DataDog/dd-trace-java#8797) -
[@&#8203;mcculls](https://github.com/mcculls))
- ✨ Read hsperfdata for Java PIDs if jvmstat is unavailable
([#&#8203;8792](DataDog/dd-trace-java#8792) -
[@&#8203;MattAlp](https://github.com/MattAlp))
- 🐛 Turn JDK socket support on by default
([#&#8203;8752](DataDog/dd-trace-java#8752) -
[@&#8203;sarahchen6](https://github.com/sarahchen6))
- ✨ Simplify context propagation
([#&#8203;8719](DataDog/dd-trace-java#8719) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))
- ✨ Add JSON parsing support
([#&#8203;8579](DataDog/dd-trace-java#8579) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))

#### Tracer internal logging

- ✨ Fix printing format of span identifiers
([#&#8203;8897](DataDog/dd-trace-java#8897) -
[@&#8203;vandonr](https://github.com/vandonr))

#### Tracer public API

- 💡 Track the source of installation
([#&#8203;8956](DataDog/dd-trace-java#8956) -
[@&#8203;mabdinur](https://github.com/mabdinur))
- ✨ Enforce size limit on application\_monitoring.yaml files
([#&#8203;8789](DataDog/dd-trace-java#8789) -
[@&#8203;mtoffl01](https://github.com/mtoffl01))
- ✨ Enabling baggage cache to support limits and non-ascii
characters
([#&#8203;8713](DataDog/dd-trace-java#8713) -
[@&#8203;mhlidd](https://github.com/mhlidd))

### Instrumentations

#### AWS Lambda instrumentation

- ✨ Pass Lambda Request ID to Extension
([#&#8203;8814](DataDog/dd-trace-java#8814) -
[@&#8203;nhulston](https://github.com/nhulston))

#### Core Java language instrumentation

- ✨ Ensure ClassloadingInstrumentation is always applied even
with `DD_TRACE_ENABLED=false`
([#&#8203;8863](DataDog/dd-trace-java#8863) -
[@&#8203;mcculls](https://github.com/mcculls))

#### Eclipse Vert.x instrumentation

- 🐛 Do not override route with / in vertx instrumentation
([#&#8203;8881](DataDog/dd-trace-java#8881) -
[@&#8203;vandonr](https://github.com/vandonr))

#### IBM Liberty

- 🐛 Fix error mark on http status for IBM liberty
([#&#8203;8822](DataDog/dd-trace-java#8822) -
[@&#8203;amarziali](https://github.com/amarziali))

#### JDBC instrumentation

- 🐛 Do not prepend DBM <> APM trace comment in SQLCommenter if there
is a pg plan hint
([#&#8203;8864](DataDog/dd-trace-java#8864) -
[@&#8203;edengorevoy](https://github.com/edengorevoy))

#### JMS instrumentation

- ✨ Add jms as an extra integration name where there is JMS
involved
([#&#8203;8933](DataDog/dd-trace-java#8933) -
[@&#8203;vandonr](https://github.com/vandonr))

#### Kotlin instrumentation

- ✨ Enable kotlin\_coroutine integration by default
([#&#8203;8848](DataDog/dd-trace-java#8848) -
[@&#8203;mcculls](https://github.com/mcculls))
- 🧹 Rework Kotlin coroutines instrumentation around coroutine
context
([#&#8203;8774](DataDog/dd-trace-java#8774) -
[@&#8203;mcculls](https://github.com/mcculls))

#### OpenTelemetry instrumentation

- 🐛 Support WithSpan inheritContext attribute
([#&#8203;8858](DataDog/dd-trace-java#8858) -
[@&#8203;amarziali](https://github.com/amarziali))
- ✨ Add context API support OTel propagators
([#&#8203;8770](DataDog/dd-trace-java#8770) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))

#### Play Framework instrumentation

- 🐛 Fix the Play Framework's span resource name priority so that the
client JAX-RS 404 cannot override it
([#&#8203;8591](DataDog/dd-trace-java#8591) -
[@&#8203;ygree](https://github.com/ygree))

#### Quarkus Instrumentation

- 🐛 Ignore quarkus jaxrs stubs and cdi wrapper proxies
([#&#8203;8891](DataDog/dd-trace-java#8891) -
[@&#8203;amarziali](https://github.com/amarziali))

#### ServiceTalk

- ✨ Improve ServiceTalk Captured Context API Instrumentation
for v0.42.56+
([#&#8203;8821](DataDog/dd-trace-java#8821) -
[@&#8203;ygree](https://github.com/ygree))

#### Spring instrumentation

- ✨ Supporting Baggage for Instrumentations used in Weblog
Tests
([#&#8203;8773](DataDog/dd-trace-java#8773) -
[@&#8203;mhlidd](https://github.com/mhlidd))

#### WebSocket Instrumentation

- 💡 Trace websocket for spring webflux reactive handlers
([#&#8203;8831](DataDog/dd-trace-java#8831) -
[@&#8203;amarziali](https://github.com/amarziali))
- 💡:test\_tube: WebSocket support for Netty
([#&#8203;8632](DataDog/dd-trace-java#8632) -
[@&#8203;ValentinZakharov](https://github.com/ValentinZakharov))

#### Zio Instrumentation

- 🧹 Cleanup Zio fiber instrumentation to avoid repeated activation
of continuation
([#&#8203;8798](DataDog/dd-trace-java#8798) -
[@&#8203;mcculls](https://github.com/mcculls))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am
every weekday" in timezone Australia/Melbourne, Automerge - At any time
(no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

GitOrigin-RevId: 9207366cdb6a1bd098082305d354a0a3c4622d7a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inst: jdbc JDBC instrumentation type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0