-
Notifications
You must be signed in to change notification settings - Fork 317
Add ErrorPriorities level for manual instrumentation #9387
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
Conversation
| if (this.statusCode == UNSET) { | ||
| this.statusCode = statusCode; | ||
| this.delegate.setError(statusCode == ERROR); | ||
| this.delegate.setError(statusCode == ERROR, ErrorPriorities.MANUAL_INSTRUMENTATION); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 suggestion: For readability, I would recommend to use static imports 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use a static import for ErrorPriorities.MANUAL_INSTRUMENTATION but since we're also using ResourceNamePriorities.MANUAL_INSTRUMENTATION in the same file, I'm not sure it's the best. Happy to make the change for ErrorPriorities.MANUAL_INSTRUMENTATION if you think it's worth it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sure, nevermind, I missed it during the review 👌
|
🎯 Code Coverage 🔗 Commit SHA: 8b187cc | Docs | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 44 metrics, 15 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.53.0-SNAPSHOT~8b187ccb2a, baseline=1.53.0-SNAPSHOT~5aa25baa32
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.055 s) : 0, 1054882
Total [baseline] (8.62 s) : 0, 8619932
Agent [candidate] (1.062 s) : 0, 1062308
Total [candidate] (8.665 s) : 0, 8664987
section iast
Agent [baseline] (1.188 s) : 0, 1187546
Total [baseline] (9.352 s) : 0, 9351520
Agent [candidate] (1.195 s) : 0, 1195337
Total [candidate] (9.328 s) : 0, 9327796
gantt
title insecure-bank - break down per module: candidate=1.53.0-SNAPSHOT~8b187ccb2a, baseline=1.53.0-SNAPSHOT~5aa25baa32
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.482 ms) : 0, 1482
crashtracking [candidate] (1.477 ms) : 0, 1477
BytebuddyAgent [baseline] (739.431 ms) : 0, 739431
BytebuddyAgent [candidate] (741.746 ms) : 0, 741746
GlobalTracer [baseline] (243.848 ms) : 0, 243848
GlobalTracer [candidate] (246.0 ms) : 0, 246000
AppSec [baseline] (30.405 ms) : 0, 30405
AppSec [candidate] (30.492 ms) : 0, 30492
Debugger [baseline] (6.111 ms) : 0, 6111
Debugger [candidate] (6.134 ms) : 0, 6134
Remote Config [baseline] (675.383 µs) : 0, 675
Remote Config [candidate] (680.374 µs) : 0, 680
Telemetry [baseline] (11.681 ms) : 0, 11681
Telemetry [candidate] (14.562 ms) : 0, 14562
section iast
crashtracking [baseline] (1.458 ms) : 0, 1458
crashtracking [candidate] (1.468 ms) : 0, 1468
BytebuddyAgent [baseline] (858.36 ms) : 0, 858360
BytebuddyAgent [candidate] (863.178 ms) : 0, 863178
GlobalTracer [baseline] (234.544 ms) : 0, 234544
GlobalTracer [candidate] (236.972 ms) : 0, 236972
IAST [baseline] (26.9 ms) : 0, 26900
IAST [candidate] (28.026 ms) : 0, 28026
AppSec [baseline] (29.589 ms) : 0, 29589
AppSec [candidate] (28.929 ms) : 0, 28929
Debugger [baseline] (6.654 ms) : 0, 6654
Debugger [candidate] (6.638 ms) : 0, 6638
Remote Config [baseline] (599.926 µs) : 0, 600
Remote Config [candidate] (595.487 µs) : 0, 595
Telemetry [baseline] (8.308 ms) : 0, 8308
Telemetry [candidate] (8.292 ms) : 0, 8292
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.53.0-SNAPSHOT~8b187ccb2a, baseline=1.53.0-SNAPSHOT~5aa25baa32
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.048 s) : 0, 1048151
Total [baseline] (10.755 s) : 0, 10754648
Agent [candidate] (1.058 s) : 0, 1058186
Total [candidate] (10.791 s) : 0, 10790881
section appsec
Agent [baseline] (1.227 s) : 0, 1227478
Total [baseline] (10.854 s) : 0, 10853661
Agent [candidate] (1.237 s) : 0, 1236789
Total [candidate] (10.976 s) : 0, 10975958
section iast
Agent [baseline] (1.19 s) : 0, 1189759
Total [baseline] (10.297 s) : 0, 10296930
Agent [candidate] (1.191 s) : 0, 1190677
Total [candidate] (11.042 s) : 0, 11041726
section profiling
Agent [baseline] (1.194 s) : 0, 1193884
Total [baseline] (10.87 s) : 0, 10869738
Agent [candidate] (1.2 s) : 0, 1199764
Total [candidate] (10.925 s) : 0, 10924712
gantt
title petclinic - break down per module: candidate=1.53.0-SNAPSHOT~8b187ccb2a, baseline=1.53.0-SNAPSHOT~5aa25baa32
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.458 ms) : 0, 1458
crashtracking [candidate] (1.459 ms) : 0, 1459
BytebuddyAgent [baseline] (734.626 ms) : 0, 734626
BytebuddyAgent [candidate] (740.024 ms) : 0, 740024
GlobalTracer [baseline] (243.12 ms) : 0, 243120
GlobalTracer [candidate] (245.729 ms) : 0, 245729
AppSec [baseline] (30.233 ms) : 0, 30233
AppSec [candidate] (30.545 ms) : 0, 30545
Debugger [baseline] (6.07 ms) : 0, 6070
Debugger [candidate] (6.146 ms) : 0, 6146
Remote Config [baseline] (665.626 µs) : 0, 666
Remote Config [candidate] (668.807 µs) : 0, 669
Telemetry [baseline] (10.908 ms) : 0, 10908
Telemetry [candidate] (12.352 ms) : 0, 12352
section appsec
crashtracking [baseline] (1.455 ms) : 0, 1455
crashtracking [candidate] (1.471 ms) : 0, 1471
BytebuddyAgent [baseline] (759.409 ms) : 0, 759409
BytebuddyAgent [candidate] (762.456 ms) : 0, 762456
GlobalTracer [baseline] (235.832 ms) : 0, 235832
GlobalTracer [candidate] (239.714 ms) : 0, 239714
IAST [baseline] (23.754 ms) : 0, 23754
IAST [candidate] (24.105 ms) : 0, 24105
AppSec [baseline] (169.599 ms) : 0, 169599
AppSec [candidate] (168.932 ms) : 0, 168932
Debugger [baseline] (6.403 ms) : 0, 6403
Debugger [candidate] (7.264 ms) : 0, 7264
Remote Config [baseline] (635.746 µs) : 0, 636
Remote Config [candidate] (649.014 µs) : 0, 649
Telemetry [baseline] (9.248 ms) : 0, 9248
Telemetry [candidate] (10.748 ms) : 0, 10748
section iast
crashtracking [baseline] (1.467 ms) : 0, 1467
crashtracking [candidate] (1.471 ms) : 0, 1471
BytebuddyAgent [baseline] (859.326 ms) : 0, 859326
BytebuddyAgent [candidate] (859.533 ms) : 0, 859533
GlobalTracer [baseline] (234.55 ms) : 0, 234550
GlobalTracer [candidate] (236.387 ms) : 0, 236387
IAST [baseline] (32.284 ms) : 0, 32284
IAST [candidate] (28.002 ms) : 0, 28002
AppSec [baseline] (25.296 ms) : 0, 25296
AppSec [candidate] (28.447 ms) : 0, 28447
Debugger [baseline] (6.67 ms) : 0, 6670
Debugger [candidate] (6.608 ms) : 0, 6608
Remote Config [baseline] (596.663 µs) : 0, 597
Remote Config [candidate] (600.343 µs) : 0, 600
Telemetry [baseline] (8.401 ms) : 0, 8401
Telemetry [candidate] (8.332 ms) : 0, 8332
section profiling
crashtracking [baseline] (1.405 ms) : 0, 1405
crashtracking [candidate] (1.413 ms) : 0, 1413
BytebuddyAgent [baseline] (760.734 ms) : 0, 760734
BytebuddyAgent [candidate] (764.087 ms) : 0, 764087
GlobalTracer [baseline] (221.891 ms) : 0, 221891
GlobalTracer [candidate] (222.954 ms) : 0, 222954
AppSec [baseline] (29.956 ms) : 0, 29956
AppSec [candidate] (30.109 ms) : 0, 30109
Debugger [baseline] (6.985 ms) : 0, 6985
Debugger [candidate] (6.319 ms) : 0, 6319
Remote Config [baseline] (721.721 µs) : 0, 722
Remote Config [candidate] (689.705 µs) : 0, 690
Telemetry [baseline] (14.712 ms) : 0, 14712
Telemetry [candidate] (16.19 ms) : 0, 16190
ProfilingAgent [baseline] (108.072 ms) : 0, 108072
ProfilingAgent [candidate] (108.167 ms) : 0, 108167
Profiling [baseline] (108.709 ms) : 0, 108709
Profiling [candidate] (108.825 ms) : 0, 108825
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 1 performance regressions! Performance is the same for 9 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~8b187ccb2a, baseline=1.53.0-SNAPSHOT~5aa25baa32
dateFormat X
axisFormat %s
section baseline
no_agent (4.412 ms) : 4363, 4461
. : milestone, 4412,
iast (8.997 ms) : 8853, 9141
. : milestone, 8997,
iast_FULL (14.256 ms) : 13973, 14539
. : milestone, 14256,
iast_GLOBAL (10.478 ms) : 10281, 10675
. : milestone, 10478,
profiling (8.4 ms) : 8271, 8529
. : milestone, 8400,
tracing (7.661 ms) : 7549, 7773
. : milestone, 7661,
section candidate
no_agent (4.381 ms) : 4328, 4434
. : milestone, 4381,
iast (9.266 ms) : 9117, 9414
. : milestone, 9266,
iast_FULL (13.942 ms) : 13670, 14214
. : milestone, 13942,
iast_GLOBAL (10.25 ms) : 10073, 10427
. : milestone, 10250,
profiling (9.019 ms) : 8875, 9164
. : milestone, 9019,
tracing (7.333 ms) : 7232, 7433
. : milestone, 7333,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~8b187ccb2a, baseline=1.53.0-SNAPSHOT~5aa25baa32
dateFormat X
axisFormat %s
section baseline
no_agent (36.581 ms) : 36287, 36874
. : milestone, 36581,
appsec (47.978 ms) : 47554, 48403
. : milestone, 47978,
code_origins (45.824 ms) : 45425, 46223
. : milestone, 45824,
iast (44.297 ms) : 43920, 44674
. : milestone, 44297,
profiling (47.765 ms) : 47307, 48222
. : milestone, 47765,
tracing (44.581 ms) : 44200, 44963
. : milestone, 44581,
section candidate
no_agent (36.627 ms) : 36329, 36925
. : milestone, 36627,
appsec (46.847 ms) : 46427, 47268
. : milestone, 46847,
code_origins (44.501 ms) : 44099, 44904
. : milestone, 44501,
iast (45.039 ms) : 44656, 45421
. : milestone, 45039,
profiling (45.812 ms) : 45404, 46220
. : milestone, 45812,
tracing (45.07 ms) : 44673, 45466
. : milestone, 45070,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~8b187ccb2a, baseline=1.53.0-SNAPSHOT~5aa25baa32
dateFormat X
axisFormat %s
section baseline
no_agent (15.535 s) : 15535000, 15535000
. : milestone, 15535000,
appsec (14.799 s) : 14799000, 14799000
. : milestone, 14799000,
iast (18.369 s) : 18369000, 18369000
. : milestone, 18369000,
iast_GLOBAL (18.086 s) : 18086000, 18086000
. : milestone, 18086000,
profiling (15.375 s) : 15375000, 15375000
. : milestone, 15375000,
tracing (14.933 s) : 14933000, 14933000
. : milestone, 14933000,
section candidate
no_agent (14.853 s) : 14853000, 14853000
. : milestone, 14853000,
appsec (14.93 s) : 14930000, 14930000
. : milestone, 14930000,
iast (18.544 s) : 18544000, 18544000
. : milestone, 18544000,
iast_GLOBAL (17.986 s) : 17986000, 17986000
. : milestone, 17986000,
profiling (15.158 s) : 15158000, 15158000
. : milestone, 15158000,
tracing (15.024 s) : 15024000, 15024000
. : milestone, 15024000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~8b187ccb2a, baseline=1.53.0-SNAPSHOT~5aa25baa32
dateFormat X
axisFormat %s
section baseline
no_agent (1.478 ms) : 1466, 1490
. : milestone, 1478,
appsec (3.674 ms) : 3456, 3891
. : milestone, 3674,
iast (2.205 ms) : 2142, 2268
. : milestone, 2205,
iast_GLOBAL (2.252 ms) : 2188, 2315
. : milestone, 2252,
profiling (2.05 ms) : 2000, 2101
. : milestone, 2050,
tracing (2.026 ms) : 1977, 2075
. : milestone, 2026,
section candidate
no_agent (1.479 ms) : 1467, 1490
. : milestone, 1479,
appsec (3.667 ms) : 3444, 3890
. : milestone, 3667,
iast (2.21 ms) : 2146, 2273
. : milestone, 2210,
iast_GLOBAL (2.248 ms) : 2184, 2311
. : milestone, 2248,
profiling (2.055 ms) : 2004, 2106
. : milestone, 2055,
tracing (2.041 ms) : 1991, 2090
. : milestone, 2041,
|
| 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.52.1` -> `1.53.0` | --- ### Release Notes <details> <summary>datadog/dd-trace-java (com.datadoghq:dd-trace-api)</summary> ### [`v1.53.0`](https://github.com/DataDog/dd-trace-java/releases/tag/v1.53.0): 1.53.0 ### Components #### Application Security Management (WAF) - 🐛 Fix NullPointerException log in AppSec ([#​9355](DataDog/dd-trace-java#9355) - [@​jandro996](https://github.com/jandro996)) - ✨ Add Forwarded header as a source to client IP resolution ([#​9310](DataDog/dd-trace-java#9310) - [@​jandro996](https://github.com/jandro996)) #### Build & Tooling - 📖 Update CODEOWNERS ([#​9294](DataDog/dd-trace-java#9294) - [@​mhlidd](https://github.com/mhlidd)) - ✨ Add dependency on Maven Central deployment to OCI publish jobs ([#​9204](DataDog/dd-trace-java#9204) - [@​sarahchen6](https://github.com/sarahchen6)) #### Continuous Integration Visibility - ✨ Upload code coverage reports to Datadog ([#​9425](DataDog/dd-trace-java#9425) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - ✨⚡ Do not follow symlinks by default when building repository index ([#​9318](DataDog/dd-trace-java#9318) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - ✨ Improve tag propagation between test event levels ([#​9278](DataDog/dd-trace-java#9278) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) #### Data Streams Monitoring - ✨ Create container hash tags propagation ([#​9282](DataDog/dd-trace-java#9282) - [@​ygree](https://github.com/ygree)) #### Database Monitoring - 🐛 Prevent crash in SQL Server's JDBC when tracing execute methods with generated keys ([#​9321](DataDog/dd-trace-java#9321) - [@​na-ji](https://github.com/na-ji)) - ✨ Create container hash tags propagation ([#​9282](DataDog/dd-trace-java#9282) - [@​ygree](https://github.com/ygree)) #### GraalVM native-image - 🐛 Update GraalVM config to reflect TempLocationManager's new package ([#​9337](DataDog/dd-trace-java#9337) - [@​luneo7](https://github.com/luneo7) - thanks for the contribution!) #### Metrics - 🐛 Add reflect config for CSS and graalvm ([#​9449](DataDog/dd-trace-java#9449) - [@​amarziali](https://github.com/amarziali)) - ✨ Align CSS health metrics ([#​9444](DataDog/dd-trace-java#9444) - [@​amarziali](https://github.com/amarziali)) - ✨ Aggregate peer tags for consumer span kind ([#​9442](DataDog/dd-trace-java#9442) - [@​amarziali](https://github.com/amarziali)) - ✨ Implement health metrics for client stats ([#​9377](DataDog/dd-trace-java#9377) - [@​amarziali](https://github.com/amarziali)) - ✨ Add peer tags, span kind and trace root flag to MetricKey bucket ([#​9178](DataDog/dd-trace-java#9178) - [@​bric3](https://github.com/bric3)) #### Profiling - ✨ Create a profile flare reporter (requires tracing or CI vis to be enabled) ([#​9433](DataDog/dd-trace-java#9433) - [@​MattAlp](https://github.com/MattAlp)) - 🐛 Properly fall-back on UDS profiling URL ([#​9401](DataDog/dd-trace-java#9401) - [@​jbachorik](https://github.com/jbachorik)) - 🐛 Properly handle trace agent IPv6 URL in profiling ([#​9334](DataDog/dd-trace-java#9334) - [@​jbachorik](https://github.com/jbachorik)) #### Realtime User Monitoring - 🐛 Avoid multiple injections on dispatch on jboss ([#​9392](DataDog/dd-trace-java#9392) - [@​amarziali](https://github.com/amarziali)) - ✨ Support async servlet for RUM injection ([#​9333](DataDog/dd-trace-java#9333) - [@​amarziali](https://github.com/amarziali)) - 🐛 Improve RUM injection matching and avoid truncating responses ([#​9323](DataDog/dd-trace-java#9323) - [@​amarziali](https://github.com/amarziali)) - 💡 Add telemetry for the RUM injector ([#​9267](DataDog/dd-trace-java#9267) - [@​sarahchen6](https://github.com/sarahchen6)) - ✨ Make rum injector stream/writer more resilient to errors ([#​9184](DataDog/dd-trace-java#9184) - [@​amarziali](https://github.com/amarziali)) #### Telemetry - 🐛 Remediate error logs ([#​9459](DataDog/dd-trace-java#9459) - [@​ygree](https://github.com/ygree)) - ✨ Report config\_id for Hands Off Config files ([#​9299](DataDog/dd-trace-java#9299) - [@​mtoffl01](https://github.com/mtoffl01)) - ✨ Adding Config Inversion Telemetry component ([#​9244](DataDog/dd-trace-java#9244) - [@​mhlidd](https://github.com/mhlidd)) #### Trace context propagation - 🧹 Migrate instrumentations to Context API ([#​9384](DataDog/dd-trace-java#9384), [#​9378](DataDog/dd-trace-java#9378), [#​9358](DataDog/dd-trace-java#9358) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) - ✨🔍 Add baggage propagation telemetry ([#​9289](DataDog/dd-trace-java#9289) - [@​rachelyangdog](https://github.com/rachelyangdog)) - 🧹 Improve Instrumenter API to use Context instead of Span ([#​9211](DataDog/dd-trace-java#9211) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) #### Tracer core - 💡:test\_tube: Enable process level tags for java 21 applications ([#​9458](DataDog/dd-trace-java#9458) - [@​amarziali](https://github.com/amarziali)) - ✨ Move base and peer service adder before span is published ([#​9408](DataDog/dd-trace-java#9408) - [@​amarziali](https://github.com/amarziali)) - ✨ Add ErrorPriorities level for manual instrumentation ([#​9387](DataDog/dd-trace-java#9387) - [@​cecile75](https://github.com/cecile75)) - ✨ Throw InvalidBooleanValueException in ConfigConverter.booleanValueOf ([#​9370](DataDog/dd-trace-java#9370) - [@​mtoffl01](https://github.com/mtoffl01)) - 🐛 Avoid NPE on featureDiscovery creation ([#​9353](DataDog/dd-trace-java#9353) - [@​amarziali](https://github.com/amarziali)) - ✨ Stable Config improvements ([#​9259](DataDog/dd-trace-java#9259) - [@​mtoffl01](https://github.com/mtoffl01)) ### Instrumentations #### gRPC instrumentation - 🐛 Changing GRPC instrumentation codes from `status.code` to `grpc.status.code` ([#​9367](DataDog/dd-trace-java#9367) - [@​mhlidd](https://github.com/mhlidd)) #### JDBC instrumentation - 🐛 Prevent crash in SQL Server's JDBC when tracing execute methods with generated keys ([#​9321](DataDog/dd-trace-java#9321) - [@​na-ji](https://github.com/na-ji)) #### Kotlin instrumentation - 🐛 Take defensive copy of original scope stack when restoring on different thread ([#​9403](DataDog/dd-trace-java#9403) - [@​mcculls](https://github.com/mcculls)) #### OpenTelemetry instrumentation - 🐛 Fix using SpanAttribute annotation on multiple parameters ([#​9412](DataDog/dd-trace-java#9412) - [@​cecile75](https://github.com/cecile75)) </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: e23ec866cef91afc6b5226d5f0dc7da538d947e8
What Does This Do
Adds error priorities for manual instrumentation, similar to what exists for priorities for resource name today.
It also sets the priority for manual instrumentation from otel spans for both resource name and error.
Motivation
Reliably override error status set by automatic instrumentation from manual instrumentation.
Additional Notes
Link to the original PR: #9098