-
Notifications
You must be signed in to change notification settings - Fork 314
Bump spotbugs gradle plugin to 6.4.2 #9748
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
base: bdu/test-decoupling-on-jdk21
Are you sure you want to change the base?
Bump spotbugs gradle plugin to 6.4.2 #9748
Conversation
…internal-api Also this forces JDK 11 to be the minimum.
# Conflicts: # communication/src/main/java/datadog/communication/ddagent/SharedCommunicationObjects.java # utils/test-utils/src/main/groovy/datadog/trace/test/util/DDSpecification.groovy
…hMaps (#9739) The keys used to lookup instances are always string literals, bounded in code by a fixed number of calls. These keys are never collected, so we don't need to use a weak map. The instance store is accessed when setting up helpers to guarantee the same instance is used by different instrumentations sharing a common type (via their parent class-loader.) Therefore each store just needs basic synchronization to guarantee it only creates one instance per-key.
* chore: Refactor instrumentation index tasks to avoid overlapping inputs * Emit index in proper generated source location and use the location as source dir. * Deduplicate code. * chore: Refactor dd-java-agent index tasks and included agent to avoid overlapping output * Expand the included agent jars in another location buildDir/included, this location contributes to the resources. * Emit index in separate location, modified index to receive input folder and output folder, this location contributes to the resources. * Fix indexer logging. * style: Access properties via `it` in Groovy DSL * chore: Fix indexer warning logs For logs like ``` [main] WARN datadog.trace.bootstrap.AgentJarIndex - Detected duplicate content 'datadog.trace.civisibility.writer.ddintake.*' under 'trace', already seen in <root>. Ensure your content is under a distinct directory. ``` * chore: Fix indexer warning log, due to duplicate license files For logs like ``` Detected duplicate content under 'META-INF.AL2.0'. Ensure your content is under a distinct directory. Detected duplicate content under 'META-INF.LGPL2.1'. Ensure your content is under a distinct directory. ``` * chore: Fix indexer warning log, due to duplicate dd-javac-plugin-client files For logs like ``` [main] WARN datadog.trace.bootstrap.AgentJarIndex - Detected duplicate content under 'datadog.compiler.utils.*'. Ensure your content is under a distinct directory. [main] WARN datadog.trace.bootstrap.AgentJarIndex - Detected duplicate content under 'datadog.compiler.annotations.*'. Ensure your content is under a distinct ``` * fix: Use Sync task rather than Copy, which may leave deleted files in place * fix: Replace weak configuration using tasks.matching {} by proper filetree.builtBy call * style: Fix star import
Previously watches, capture expressions allow to describe what exactly we want to capture and put into a snapshot for a log probe. When one or more capture expressions is defined, only the capture expressions are added to the Captures part of the snapshot. Expressions can be complex using the expression language and must return a value from which we start to capture the object graph following the limits that can be defined per capture expressions. A new attribute captureExpressions is added into the snapshot.
…dConfigPlugin` (#9714) * moving task dependency from gradle file to task * removing comment
Consider guava and fastutil collections and maps as safe so they can be treated as regular collections and maps and use in expression and captured as well use a list for safe packages
* chore(ci): bump the gh-actions-packages group with 2 updates Bumps the gh-actions-packages group with 2 updates: [DataDog/commit-headless](https://github.com/datadog/commit-headless) and [github/codeql-action](https://github.com/github/codeql-action). Updates `DataDog/commit-headless` from 1.0.0 to 2.0.1 - [Changelog](https://github.com/DataDog/commit-headless/blob/main/pushchanges.go) - [Commits](DataDog/commit-headless@1186485...5a0f387) Updates `github/codeql-action` from 3.30.6 to 4.30.8 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@64d10c1...f443b60) --- updated-dependencies: - dependency-name: DataDog/commit-headless dependency-version: 2.0.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: gh-actions-packages - dependency-name: github/codeql-action dependency-version: 4.30.8 dependency-type: direct:production update-type: version-update:semver-major dependency-group: gh-actions-packages ... Signed-off-by: dependabot[bot] <[email protected]> * fix(ci): Add missing tag name update --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bruce Bujon <[email protected]>
Introducing ProbeMetadata class to help get probe from instrumented code. Instead of getting the probe instance from a map based on probeId we are directly getting it from an array that is filled at instrumentation time. This way it's cheaper and abstracted the way to get probe definition to evaluate conditions for example. In instrumented code, instead of referring the probe by the probeId hard-coded we are using index in probe metadata array. ProbeMetadata class encapsulate an AtomicReferenceArray to make sure every cell as a volatile-style access and provide linear way to remove or add into this array. For now linear scanning is fine as we don't expect a lot of probes in a same location. Could improve on that using bitmaps later if require. Instrumentation is changed to push int arrays instead of String arrays and can be optimize later to accept static arguments instead of varargs/array instead.
* Use lazy API in publish * Use lazy API in test-suites
if chainedExceptionIndex stored into the snapshot is incorrect, it can lead to an IndexOutOfBoundsException. Protect against it
…n and Trace Annotations (#9759) * re-working otel spec * fixing muzzle * fixing tests * updating tests * fixing test
Co-authored-by: dd-octo-sts[bot] <200755185+dd-octo-sts[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Revert incorrect change to jmxfetch workflow * Make correct change to system tests workflow
condition was wrongly evaluated
Debugger benchmarksParameters
See matching parameters
SummaryFound 3 performance improvements and 0 performance regressions! Performance is the same for 6 metrics, 6 unstable metrics.
See unchanged results
Request duration reports for reportsgantt
title reports - request duration [CI 0.99] : candidate=None, baseline=None
dateFormat X
axisFormat %s
section baseline
noprobe (322.865 µs) : 284, 362
. : milestone, 323,
basic (292.34 µs) : 286, 299
. : milestone, 292,
loop (8.956 ms) : 8953, 8959
. : milestone, 8956,
section candidate
noprobe (331.706 µs) : 280, 383
. : milestone, 332,
basic (279.828 µs) : 273, 286
. : milestone, 280,
loop (8.956 ms) : 8950, 8962
. : milestone, 8956,
|
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 54 metrics, 11 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~aae1e80721, baseline=1.55.0-SNAPSHOT~c0b9147e6b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.036 s) : 0, 1036276
Total [baseline] (8.654 s) : 0, 8653779
Agent [candidate] (1.035 s) : 0, 1035315
Total [candidate] (8.68 s) : 0, 8679615
section iast
Agent [baseline] (1.169 s) : 0, 1169472
Total [baseline] (9.328 s) : 0, 9328251
Agent [candidate] (1.169 s) : 0, 1168548
Total [candidate] (9.352 s) : 0, 9352146
gantt
title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~aae1e80721, baseline=1.55.0-SNAPSHOT~c0b9147e6b
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.474 ms) : 0, 1474
crashtracking [candidate] (1.474 ms) : 0, 1474
BytebuddyAgent [baseline] (706.706 ms) : 0, 706706
BytebuddyAgent [candidate] (706.02 ms) : 0, 706020
GlobalTracer [baseline] (246.316 ms) : 0, 246316
GlobalTracer [candidate] (246.163 ms) : 0, 246163
AppSec [baseline] (32.478 ms) : 0, 32478
AppSec [candidate] (32.41 ms) : 0, 32410
Debugger [baseline] (6.482 ms) : 0, 6482
Debugger [candidate] (6.403 ms) : 0, 6403
Remote Config [baseline] (685.73 µs) : 0, 686
Remote Config [candidate] (678.49 µs) : 0, 678
Telemetry [baseline] (14.485 ms) : 0, 14485
Telemetry [candidate] (13.613 ms) : 0, 13613
Flare Poller [baseline] (6.324 ms) : 0, 6324
Flare Poller [candidate] (7.27 ms) : 0, 7270
section iast
crashtracking [baseline] (1.484 ms) : 0, 1484
crashtracking [candidate] (1.482 ms) : 0, 1482
BytebuddyAgent [baseline] (830.325 ms) : 0, 830325
BytebuddyAgent [candidate] (831.37 ms) : 0, 831370
GlobalTracer [baseline] (235.057 ms) : 0, 235057
GlobalTracer [candidate] (233.695 ms) : 0, 233695
AppSec [baseline] (29.872 ms) : 0, 29872
AppSec [candidate] (27.185 ms) : 0, 27185
Debugger [baseline] (6.121 ms) : 0, 6121
Debugger [candidate] (6.121 ms) : 0, 6121
Remote Config [baseline] (600.125 µs) : 0, 600
Remote Config [candidate] (603.971 µs) : 0, 604
Telemetry [baseline] (8.425 ms) : 0, 8425
Telemetry [candidate] (8.386 ms) : 0, 8386
Flare Poller [baseline] (4.205 ms) : 0, 4205
Flare Poller [candidate] (4.069 ms) : 0, 4069
IAST [baseline] (31.937 ms) : 0, 31937
IAST [candidate] (34.167 ms) : 0, 34167
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~aae1e80721, baseline=1.55.0-SNAPSHOT~c0b9147e6b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.036 s) : 0, 1036006
Total [baseline] (10.8 s) : 0, 10799979
Agent [candidate] (1.037 s) : 0, 1036748
Total [candidate] (10.869 s) : 0, 10869235
section appsec
Agent [baseline] (1.201 s) : 0, 1201348
Total [baseline] (10.959 s) : 0, 10958593
Agent [candidate] (1.212 s) : 0, 1211585
Total [candidate] (10.959 s) : 0, 10958597
section iast
Agent [baseline] (1.163 s) : 0, 1162660
Total [baseline] (11.082 s) : 0, 11081585
Agent [candidate] (1.175 s) : 0, 1174879
Total [candidate] (11.195 s) : 0, 11194813
section profiling
Agent [baseline] (1.173 s) : 0, 1172741
Total [baseline] (10.884 s) : 0, 10884254
Agent [candidate] (1.182 s) : 0, 1181642
Total [candidate] (10.918 s) : 0, 10917866
gantt
title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~aae1e80721, baseline=1.55.0-SNAPSHOT~c0b9147e6b
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.486 ms) : 0, 1486
crashtracking [candidate] (1.465 ms) : 0, 1465
BytebuddyAgent [baseline] (706.744 ms) : 0, 706744
BytebuddyAgent [candidate] (706.833 ms) : 0, 706833
GlobalTracer [baseline] (245.97 ms) : 0, 245970
GlobalTracer [candidate] (246.323 ms) : 0, 246323
AppSec [baseline] (32.476 ms) : 0, 32476
AppSec [candidate] (32.651 ms) : 0, 32651
Debugger [baseline] (6.462 ms) : 0, 6462
Debugger [candidate] (6.486 ms) : 0, 6486
Remote Config [baseline] (674.87 µs) : 0, 675
Remote Config [candidate] (686.019 µs) : 0, 686
Telemetry [baseline] (15.09 ms) : 0, 15090
Telemetry [candidate] (15.275 ms) : 0, 15275
Flare Poller [baseline] (5.738 ms) : 0, 5738
Flare Poller [candidate] (5.772 ms) : 0, 5772
section appsec
crashtracking [baseline] (1.461 ms) : 0, 1461
crashtracking [candidate] (1.473 ms) : 0, 1473
BytebuddyAgent [baseline] (724.571 ms) : 0, 724571
BytebuddyAgent [candidate] (732.132 ms) : 0, 732132
GlobalTracer [baseline] (235.532 ms) : 0, 235532
GlobalTracer [candidate] (237.079 ms) : 0, 237079
AppSec [baseline] (174.773 ms) : 0, 174773
AppSec [candidate] (175.245 ms) : 0, 175245
Debugger [baseline] (5.944 ms) : 0, 5944
Debugger [candidate] (6.038 ms) : 0, 6038
Remote Config [baseline] (633.233 µs) : 0, 633
Remote Config [candidate] (643.535 µs) : 0, 644
Telemetry [baseline] (8.509 ms) : 0, 8509
Telemetry [candidate] (8.58 ms) : 0, 8580
Flare Poller [baseline] (3.883 ms) : 0, 3883
Flare Poller [candidate] (3.945 ms) : 0, 3945
IAST [baseline] (24.955 ms) : 0, 24955
IAST [candidate] (25.25 ms) : 0, 25250
section iast
crashtracking [baseline] (1.463 ms) : 0, 1463
crashtracking [candidate] (1.475 ms) : 0, 1475
BytebuddyAgent [baseline] (825.353 ms) : 0, 825353
BytebuddyAgent [candidate] (834.292 ms) : 0, 834292
GlobalTracer [baseline] (234.267 ms) : 0, 234267
GlobalTracer [candidate] (236.068 ms) : 0, 236068
AppSec [baseline] (27.923 ms) : 0, 27923
AppSec [candidate] (28.496 ms) : 0, 28496
Debugger [baseline] (6.062 ms) : 0, 6062
Debugger [candidate] (6.238 ms) : 0, 6238
Remote Config [baseline] (600.78 µs) : 0, 601
Remote Config [candidate] (603.685 µs) : 0, 604
Telemetry [baseline] (8.308 ms) : 0, 8308
Telemetry [candidate] (8.481 ms) : 0, 8481
Flare Poller [baseline] (4.128 ms) : 0, 4128
Flare Poller [candidate] (4.14 ms) : 0, 4140
IAST [baseline] (33.233 ms) : 0, 33233
IAST [candidate] (33.53 ms) : 0, 33530
section profiling
ProfilingAgent [baseline] (109.072 ms) : 0, 109072
ProfilingAgent [candidate] (110.448 ms) : 0, 110448
crashtracking [baseline] (1.467 ms) : 0, 1467
crashtracking [candidate] (1.456 ms) : 0, 1456
BytebuddyAgent [baseline] (727.012 ms) : 0, 727012
BytebuddyAgent [candidate] (731.847 ms) : 0, 731847
GlobalTracer [baseline] (219.989 ms) : 0, 219989
GlobalTracer [candidate] (221.713 ms) : 0, 221713
AppSec [baseline] (32.266 ms) : 0, 32266
AppSec [candidate] (32.628 ms) : 0, 32628
Debugger [baseline] (12.085 ms) : 0, 12085
Debugger [candidate] (12.272 ms) : 0, 12272
Remote Config [baseline] (1.429 ms) : 0, 1429
Remote Config [candidate] (1.471 ms) : 0, 1471
Telemetry [baseline] (9.921 ms) : 0, 9921
Telemetry [candidate] (9.775 ms) : 0, 9775
Flare Poller [baseline] (4.123 ms) : 0, 4123
Flare Poller [candidate] (4.082 ms) : 0, 4082
Profiling [baseline] (109.709 ms) : 0, 109709
Profiling [candidate] (111.082 ms) : 0, 111082
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 4 performance regressions! Performance is the same for 8 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~aae1e80721, baseline=1.55.0-SNAPSHOT~c0b9147e6b
dateFormat X
axisFormat %s
section baseline
no_agent (4.394 ms) : 4345, 4444
. : milestone, 4394,
iast (10.034 ms) : 9862, 10205
. : milestone, 10034,
iast_FULL (14.508 ms) : 14219, 14796
. : milestone, 14508,
iast_GLOBAL (10.677 ms) : 10489, 10864
. : milestone, 10677,
profiling (8.74 ms) : 8607, 8872
. : milestone, 8740,
tracing (7.766 ms) : 7649, 7884
. : milestone, 7766,
section candidate
no_agent (4.463 ms) : 4405, 4521
. : milestone, 4463,
iast (9.678 ms) : 9511, 9846
. : milestone, 9678,
iast_FULL (15.324 ms) : 15022, 15626
. : milestone, 15324,
iast_GLOBAL (11.066 ms) : 10869, 11263
. : milestone, 11066,
profiling (8.958 ms) : 8805, 9111
. : milestone, 8958,
tracing (7.798 ms) : 7681, 7915
. : milestone, 7798,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~aae1e80721, baseline=1.55.0-SNAPSHOT~c0b9147e6b
dateFormat X
axisFormat %s
section baseline
no_agent (37.079 ms) : 36782, 37376
. : milestone, 37079,
appsec (47.593 ms) : 47166, 48020
. : milestone, 47593,
code_origins (44.097 ms) : 43728, 44465
. : milestone, 44097,
iast (42.992 ms) : 42633, 43352
. : milestone, 42992,
profiling (49.48 ms) : 49048, 49913
. : milestone, 49480,
tracing (42.769 ms) : 42408, 43130
. : milestone, 42769,
section candidate
no_agent (36.881 ms) : 36581, 37180
. : milestone, 36881,
appsec (50.097 ms) : 49650, 50543
. : milestone, 50097,
code_origins (45.59 ms) : 45193, 45987
. : milestone, 45590,
iast (43.652 ms) : 43264, 44040
. : milestone, 43652,
profiling (50.646 ms) : 50175, 51116
. : milestone, 50646,
tracing (44.504 ms) : 44114, 44894
. : milestone, 44504,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~aae1e80721, baseline=1.55.0-SNAPSHOT~c0b9147e6b
dateFormat X
axisFormat %s
section baseline
no_agent (15.481 s) : 15481000, 15481000
. : milestone, 15481000,
appsec (14.826 s) : 14826000, 14826000
. : milestone, 14826000,
iast (18.61 s) : 18610000, 18610000
. : milestone, 18610000,
iast_GLOBAL (18.256 s) : 18256000, 18256000
. : milestone, 18256000,
profiling (15.762 s) : 15762000, 15762000
. : milestone, 15762000,
tracing (15.051 s) : 15051000, 15051000
. : milestone, 15051000,
section candidate
no_agent (15.427 s) : 15427000, 15427000
. : milestone, 15427000,
appsec (14.789 s) : 14789000, 14789000
. : milestone, 14789000,
iast (18.69 s) : 18690000, 18690000
. : milestone, 18690000,
iast_GLOBAL (17.769 s) : 17769000, 17769000
. : milestone, 17769000,
profiling (15.393 s) : 15393000, 15393000
. : milestone, 15393000,
tracing (14.931 s) : 14931000, 14931000
. : milestone, 14931000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~aae1e80721, baseline=1.55.0-SNAPSHOT~c0b9147e6b
dateFormat X
axisFormat %s
section baseline
no_agent (1.471 ms) : 1460, 1482
. : milestone, 1471,
appsec (3.719 ms) : 3498, 3940
. : milestone, 3719,
iast (2.206 ms) : 2143, 2270
. : milestone, 2206,
iast_GLOBAL (2.249 ms) : 2185, 2314
. : milestone, 2249,
profiling (2.054 ms) : 2002, 2105
. : milestone, 2054,
tracing (2.043 ms) : 1992, 2094
. : milestone, 2043,
section candidate
no_agent (1.472 ms) : 1461, 1484
. : milestone, 1472,
appsec (3.725 ms) : 3508, 3943
. : milestone, 3725,
iast (2.202 ms) : 2138, 2265
. : milestone, 2202,
iast_GLOBAL (2.258 ms) : 2194, 2323
. : milestone, 2258,
profiling (2.504 ms) : 2334, 2674
. : milestone, 2504,
tracing (2.021 ms) : 1971, 2070
. : milestone, 2021,
|
* Refactored EnvironmentVariables to be testable. * adding supported-configurations.json file * removing extra supported-configurations.json * migrating config-utils tests and ConfigInversionMetric telemetry * config inversion init * migrating config-utils tests * undo move of test files that rely on inject*config * responding to PR comments * updating class coverage exclude * cleanup and code coverage * init migration * creating noop implementation of ConfigInversionMetricCollector * adding Noop implementation to exclude code coverage * adding to bootstrap classpath for testing * bugfixes * adding more configurations to supported-configurations and updating native test classes * fix native build and update telemetry test with clear error message * PR comments * removing explicit dependency on environment component * responding to PR comments * updating native loading * updating failing tests * updating memory for native build * adding documentation for failing tests * increasing memory * reverting gradle memory * cleanup --------- Co-authored-by: Alexey Kuznetsov <[email protected]>
* Experimenting with introducing CoreSpanBuilder reuse Initial performance experiment The idea is to store a CoreSpanBuilder per thread, since usually only SpanBuilder is in use at a given time per thread -- and CoreSpanBuilder isn't thread safe This simple change provides a giant boost in small heaps Improving Spring petclinic throughput from -39% to -19% with 80m heap * Adding protection against reusing a CoreSpanBuilder that's still in-use * spotless * Adding configuration option to control reuse of SpanBuilders * Adding explanatory comments * Enabling by default * Adding reuse tests Refactored code, so tests work regardless of Config * spotless * Changed the API to be safe for atypical usage To avoid breaking any potential code that builds multiple spans from the same SpanBuilder, updated the SpanBuilder pooling approach Introduced a new method singleSpanBuilder which can build one and only one span, this method can be used by automatic instrumentation as an optimization. singleSpanBuilder is now used inside the startSpan convenience methods, since we know they only build and return one span. Any automatic instrumentation using startSpan gets the optimization for free. buildSpan maintains its original semantics, so all existing continues to work as is. * Fleshing out tests * spotless * Improving single threaded performance In a microbenchmark, buildSpan was performing worse than previously. To address, that shortcoming and to clean-up the code... Made CoreSpanBuilder abstract and introduced two child classes: MultiSpanBuilder and ReusableSingleSpanBuilder MultiSpanBuilder is used by buildSpan ReusableSingleSpanBuilder is used by singleSpanBuilder / startSpan (indirectly) * spotless * Fixing test that renaming didn't update properly * Adding benchmarks for span creation * spotless * Adding clarifying comments & more tests * spotless * tweaking comments * More comments * More comment clean-up * Addressing review feedback Added an init instead of calling reset when creating a new ReusableSingleSpanBuilder Added some asserts to catch misuse of the API * Adding overload to just check major version * Adding ThreadUtils Adding ThreadUtils class that enables checking if Threads are virtual threads * Adding isVirtualThread check to reuseSingleSpanBuilder * Addressing review comments - reduced visibility * Update dd-trace-core/src/main/java/datadog/trace/core/CoreTracer.java Co-authored-by: Brice Dutheil <[email protected]> * Update internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/api/AgentTracer.java Co-authored-by: Brice Dutheil <[email protected]> * Update dd-trace-core/src/main/java/datadog/trace/core/CoreTracer.java Co-authored-by: Brice Dutheil <[email protected]> * Fixing bad update from GitHub suggestion merge * Adding Javadoc * spotless * Update CoreTracer.java Fixing assertion with blackhole test Moved the inUse tracking to start (rather than buildSpan) * Updating comments to reflect the usage logic was moved into start * Tweaking comments * Improving test coverage - exposed bug with not setting inUse in init * spotless * A bit of clean-up - introducing some helper methods * Fixing v-thread tests * CoreTracerTest -> CoreTracerTest2 Seeing if removing naming conflict with Groovy tests, fix Jacoco coverage calculation * Excluded ThreadUtils from coverage - JVM version specific * Addressing review comments - switching to JUnit assume * Adding comment to explain the name --------- Co-authored-by: Brice Dutheil <[email protected]>
…ple times (#9840) * Avoid pending queue wedge if tracer flare is generated multiple times In DumpDrain, the collectTraces method replaces the 'data' field with an empty ArrayList, but at the same time, it does not also reset the 'index' field. If another dump is performed later, this leads the get method reaching the 'return null' statement, and as the comment states, this can (and does) break the queue. This change does a few things: - Resets the index in collectTraces when the data field is replaced (and marks the index field as volatile). This should prevent the above situation from happening. - In case the situation still happens, a stand-in CommandElement is returned to avoid returning null. A warning message is also logged. - The existing "testing tracer flare dump with multiple traces" test case is expanded to exercise problem. Here is an example stack trace when the hang happens: "dd-trace-monitor" #38 daemon prio=5 os_prio=31 tid=0x0000000110e6e000 nid=0x7617 runnable [0x0000000171032000] java.lang.Thread.State: RUNNABLE at org.jctools.queues.MpscBlockingConsumerArrayQueue.spinWaitForElement(MpscBlockingConsumerArrayQueue.java:634) at org.jctools.queues.MpscBlockingConsumerArrayQueue.parkUntilNext(MpscBlockingConsumerArrayQueue.java:566) at org.jctools.queues.MpscBlockingConsumerArrayQueue.take(MpscBlockingConsumerArrayQueue.java:482) at datadog.trace.core.PendingTraceBuffer$DelayingPendingTraceBuffer$Worker.run(PendingTraceBuffer.java:317) at java.lang.Thread.run(Thread.java:750) * Use SEND_TELEMETRY for DumpDrain's index out of bounds warning log --------- Co-authored-by: DJ Gregor <[email protected]>
In case of a method probe without condition we can move the sampling is currently done in LogProbe::evaluate to LogProbe::isReadToCapture. This way if the sample fails we return false on isReadyTocapture and no CapturedContext is created and nothing captured. If we sample the execution the CapturedContext will be created we capture the context and serialize the result, but we are sure that we are not doing for nothing. We introduce also a differentiation for single probe/multiple probe in calling evaluate that is propagated to probe implementation. it helps to differentiate the behavior based on the instrumentation
🎯 Code Coverage 🔗 Commit SHA: aae1e80 | Docs | Was this helpful? Give us feedback! |
What Does This Do
This PR bumps spotbugs gradle plugin to the most recent version 6.4.2 to this day (from 5.0.14).
And require a JDK 11 minimum to run.
Important
This version of spotbugs has new rules, better detection engine that requires to change so of the warnings ignores, or fix some code.
Motivation
Additional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any useful labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]