-
Notifications
You must be signed in to change notification settings - Fork 292
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
Add pending traces report in tracer flares #8053
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 51 metrics, 12 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.46.0-SNAPSHOT~3b1c41a06f, baseline=1.46.0-SNAPSHOT~dbbe55c183
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.04 s) : 0, 1039573
Total [baseline] (8.651 s) : 0, 8651320
Agent [candidate] (1.041 s) : 0, 1040538
Total [candidate] (8.625 s) : 0, 8624603
section iast
Agent [baseline] (1.171 s) : 0, 1171422
Total [baseline] (9.209 s) : 0, 9209425
Agent [candidate] (1.172 s) : 0, 1171922
Total [candidate] (9.205 s) : 0, 9204670
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.169 s) : 0, 1168674
Total [baseline] (9.203 s) : 0, 9203390
Agent [candidate] (1.179 s) : 0, 1178677
Total [candidate] (9.192 s) : 0, 9191592
section iast_TELEMETRY_OFF
Agent [baseline] (1.165 s) : 0, 1165245
Total [baseline] (9.201 s) : 0, 9200511
Agent [candidate] (1.175 s) : 0, 1174645
Total [candidate] (9.231 s) : 0, 9231258
gantt
title insecure-bank - break down per module: candidate=1.46.0-SNAPSHOT~3b1c41a06f, baseline=1.46.0-SNAPSHOT~dbbe55c183
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (715.072 ms) : 0, 715072
BytebuddyAgent [candidate] (715.951 ms) : 0, 715951
GlobalTracer [baseline] (239.797 ms) : 0, 239797
GlobalTracer [candidate] (240.834 ms) : 0, 240834
AppSec [baseline] (55.87 ms) : 0, 55870
AppSec [candidate] (55.679 ms) : 0, 55679
Remote Config [baseline] (714.581 µs) : 0, 715
Remote Config [candidate] (716.614 µs) : 0, 717
Telemetry [baseline] (12.935 ms) : 0, 12935
Telemetry [candidate] (12.113 ms) : 0, 12113
section iast
BytebuddyAgent [baseline] (836.578 ms) : 0, 836578
BytebuddyAgent [candidate] (835.419 ms) : 0, 835419
GlobalTracer [baseline] (231.335 ms) : 0, 231335
GlobalTracer [candidate] (232.489 ms) : 0, 232489
IAST [baseline] (26.955 ms) : 0, 26955
IAST [candidate] (24.183 ms) : 0, 24183
AppSec [baseline] (51.939 ms) : 0, 51939
AppSec [candidate] (55.303 ms) : 0, 55303
Remote Config [baseline] (607.018 µs) : 0, 607
Remote Config [candidate] (600.116 µs) : 0, 600
Telemetry [baseline] (8.718 ms) : 0, 8718
Telemetry [candidate] (8.637 ms) : 0, 8637
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (834.002 ms) : 0, 834002
BytebuddyAgent [candidate] (840.799 ms) : 0, 840799
GlobalTracer [baseline] (230.639 ms) : 0, 230639
GlobalTracer [candidate] (232.551 ms) : 0, 232551
IAST [baseline] (25.653 ms) : 0, 25653
IAST [candidate] (27.726 ms) : 0, 27726
AppSec [baseline] (53.837 ms) : 0, 53837
AppSec [candidate] (52.54 ms) : 0, 52540
Remote Config [baseline] (612.646 µs) : 0, 613
Remote Config [candidate] (621.986 µs) : 0, 622
Telemetry [baseline] (8.673 ms) : 0, 8673
Telemetry [candidate] (8.847 ms) : 0, 8847
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (831.232 ms) : 0, 831232
BytebuddyAgent [candidate] (837.757 ms) : 0, 837757
GlobalTracer [baseline] (230.354 ms) : 0, 230354
GlobalTracer [candidate] (233.102 ms) : 0, 233102
IAST [baseline] (22.873 ms) : 0, 22873
IAST [candidate] (26.059 ms) : 0, 26059
AppSec [baseline] (56.191 ms) : 0, 56191
AppSec [candidate] (53.239 ms) : 0, 53239
Remote Config [baseline] (600.658 µs) : 0, 601
Remote Config [candidate] (614.843 µs) : 0, 615
Telemetry [baseline] (8.628 ms) : 0, 8628
Telemetry [candidate] (8.609 ms) : 0, 8609
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.46.0-SNAPSHOT~3b1c41a06f, baseline=1.46.0-SNAPSHOT~dbbe55c183
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.048 s) : 0, 1047636
Total [baseline] (10.482 s) : 0, 10481534
Agent [candidate] (1.044 s) : 0, 1043998
Total [candidate] (10.551 s) : 0, 10550785
section appsec
Agent [baseline] (1.181 s) : 0, 1180636
Total [baseline] (10.732 s) : 0, 10731807
Agent [candidate] (1.187 s) : 0, 1187499
Total [candidate] (10.731 s) : 0, 10731014
section iast
Agent [baseline] (1.175 s) : 0, 1175120
Total [baseline] (10.955 s) : 0, 10955356
Agent [candidate] (1.171 s) : 0, 1171267
Total [candidate] (10.94 s) : 0, 10939879
section profiling
Agent [baseline] (1.26 s) : 0, 1260474
Total [baseline] (10.835 s) : 0, 10835237
Agent [candidate] (1.267 s) : 0, 1266536
Total [candidate] (10.939 s) : 0, 10939147
gantt
title petclinic - break down per module: candidate=1.46.0-SNAPSHOT~3b1c41a06f, baseline=1.46.0-SNAPSHOT~dbbe55c183
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (721.075 ms) : 0, 721075
BytebuddyAgent [candidate] (717.08 ms) : 0, 717080
GlobalTracer [baseline] (241.591 ms) : 0, 241591
GlobalTracer [candidate] (242.794 ms) : 0, 242794
AppSec [baseline] (55.833 ms) : 0, 55833
AppSec [candidate] (55.853 ms) : 0, 55853
Remote Config [baseline] (724.502 µs) : 0, 725
Remote Config [candidate] (721.799 µs) : 0, 722
Telemetry [baseline] (13.116 ms) : 0, 13116
Telemetry [candidate] (12.363 ms) : 0, 12363
section appsec
BytebuddyAgent [baseline] (733.069 ms) : 0, 733069
BytebuddyAgent [candidate] (736.177 ms) : 0, 736177
GlobalTracer [baseline] (237.56 ms) : 0, 237560
GlobalTracer [candidate] (239.202 ms) : 0, 239202
AppSec [baseline] (175.134 ms) : 0, 175134
AppSec [candidate] (176.68 ms) : 0, 176680
Remote Config [baseline] (650.583 µs) : 0, 651
Remote Config [candidate] (658.255 µs) : 0, 658
Telemetry [baseline] (8.264 ms) : 0, 8264
Telemetry [candidate] (8.682 ms) : 0, 8682
IAST [baseline] (21.565 ms) : 0, 21565
IAST [candidate] (21.653 ms) : 0, 21653
section iast
BytebuddyAgent [baseline] (837.109 ms) : 0, 837109
BytebuddyAgent [candidate] (834.458 ms) : 0, 834458
GlobalTracer [baseline] (233.057 ms) : 0, 233057
GlobalTracer [candidate] (232.792 ms) : 0, 232792
AppSec [baseline] (53.296 ms) : 0, 53296
AppSec [candidate] (53.073 ms) : 0, 53073
Remote Config [baseline] (625.402 µs) : 0, 625
Remote Config [candidate] (622.045 µs) : 0, 622
Telemetry [baseline] (8.846 ms) : 0, 8846
Telemetry [candidate] (8.637 ms) : 0, 8637
IAST [baseline] (26.842 ms) : 0, 26842
IAST [candidate] (26.402 ms) : 0, 26402
section profiling
BytebuddyAgent [baseline] (706.5 ms) : 0, 706500
BytebuddyAgent [candidate] (711.569 ms) : 0, 711569
GlobalTracer [baseline] (351.334 ms) : 0, 351334
GlobalTracer [candidate] (352.428 ms) : 0, 352428
AppSec [baseline] (55.017 ms) : 0, 55017
AppSec [candidate] (54.323 ms) : 0, 54323
Remote Config [baseline] (709.698 µs) : 0, 710
Remote Config [candidate] (694.106 µs) : 0, 694
Telemetry [baseline] (8.906 ms) : 0, 8906
Telemetry [candidate] (8.882 ms) : 0, 8882
ProfilingAgent [baseline] (95.708 ms) : 0, 95708
ProfilingAgent [candidate] (96.049 ms) : 0, 96049
Profiling [baseline] (95.734 ms) : 0, 95734
Profiling [candidate] (96.076 ms) : 0, 96076
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 18 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.46.0-SNAPSHOT~3b1c41a06f, baseline=1.46.0-SNAPSHOT~dbbe55c183
dateFormat X
axisFormat %s
section baseline
no_agent (1.374 ms) : 1355, 1393
. : milestone, 1374,
appsec (1.752 ms) : 1728, 1775
. : milestone, 1752,
appsec_no_iast (1.77 ms) : 1746, 1794
. : milestone, 1770,
iast (1.486 ms) : 1461, 1510
. : milestone, 1486,
profiling (1.552 ms) : 1527, 1577
. : milestone, 1552,
tracing (1.476 ms) : 1450, 1501
. : milestone, 1476,
section candidate
no_agent (1.356 ms) : 1336, 1376
. : milestone, 1356,
appsec (1.727 ms) : 1703, 1750
. : milestone, 1727,
appsec_no_iast (1.734 ms) : 1709, 1759
. : milestone, 1734,
iast (1.514 ms) : 1490, 1538
. : milestone, 1514,
profiling (1.494 ms) : 1471, 1517
. : milestone, 1494,
tracing (1.505 ms) : 1480, 1529
. : milestone, 1505,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.46.0-SNAPSHOT~3b1c41a06f, baseline=1.46.0-SNAPSHOT~dbbe55c183
dateFormat X
axisFormat %s
section baseline
no_agent (373.388 µs) : 353, 394
. : milestone, 373,
iast (510.145 µs) : 487, 533
. : milestone, 510,
iast_FULL (741.806 µs) : 719, 765
. : milestone, 742,
iast_GLOBAL (561.8 µs) : 538, 586
. : milestone, 562,
iast_HARDCODED_SECRET_DISABLED (509.863 µs) : 487, 533
. : milestone, 510,
iast_INACTIVE (464.086 µs) : 442, 486
. : milestone, 464,
iast_TELEMETRY_OFF (497.525 µs) : 474, 521
. : milestone, 498,
tracing (457.156 µs) : 434, 480
. : milestone, 457,
section candidate
no_agent (377.864 µs) : 358, 398
. : milestone, 378,
iast (507.293 µs) : 484, 530
. : milestone, 507,
iast_FULL (738.999 µs) : 717, 761
. : milestone, 739,
iast_GLOBAL (560.144 µs) : 537, 583
. : milestone, 560,
iast_HARDCODED_SECRET_DISABLED (506.977 µs) : 483, 531
. : milestone, 507,
iast_INACTIVE (459.048 µs) : 437, 481
. : milestone, 459,
iast_TELEMETRY_OFF (494.766 µs) : 471, 518
. : milestone, 495,
tracing (447.351 µs) : 426, 468
. : milestone, 447,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.46.0-SNAPSHOT~3b1c41a06f, baseline=1.46.0-SNAPSHOT~dbbe55c183
dateFormat X
axisFormat %s
section baseline
no_agent (1.476 ms) : 1465, 1488
. : milestone, 1476,
appsec (2.374 ms) : 2330, 2417
. : milestone, 2374,
iast (2.11 ms) : 2056, 2165
. : milestone, 2110,
iast_GLOBAL (2.158 ms) : 2103, 2213
. : milestone, 2158,
profiling (1.978 ms) : 1935, 2022
. : milestone, 1978,
tracing (1.938 ms) : 1897, 1980
. : milestone, 1938,
section candidate
no_agent (1.474 ms) : 1462, 1485
. : milestone, 1474,
appsec (2.371 ms) : 2327, 2414
. : milestone, 2371,
iast (2.117 ms) : 2062, 2172
. : milestone, 2117,
iast_GLOBAL (2.165 ms) : 2110, 2220
. : milestone, 2165,
profiling (1.982 ms) : 1938, 2026
. : milestone, 1982,
tracing (1.963 ms) : 1921, 2005
. : milestone, 1963,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.46.0-SNAPSHOT~3b1c41a06f, baseline=1.46.0-SNAPSHOT~dbbe55c183
dateFormat X
axisFormat %s
section baseline
no_agent (15.468 s) : 15468000, 15468000
. : milestone, 15468000,
appsec (15.059 s) : 15059000, 15059000
. : milestone, 15059000,
iast (19.056 s) : 19056000, 19056000
. : milestone, 19056000,
iast_GLOBAL (18.196 s) : 18196000, 18196000
. : milestone, 18196000,
profiling (15.87 s) : 15870000, 15870000
. : milestone, 15870000,
tracing (15.104 s) : 15104000, 15104000
. : milestone, 15104000,
section candidate
no_agent (14.958 s) : 14958000, 14958000
. : milestone, 14958000,
appsec (14.998 s) : 14998000, 14998000
. : milestone, 14998000,
iast (18.505 s) : 18505000, 18505000
. : milestone, 18505000,
iast_GLOBAL (17.674 s) : 17674000, 17674000
. : milestone, 17674000,
profiling (14.996 s) : 14996000, 14996000
. : milestone, 14996000,
tracing (15.124 s) : 15124000, 15124000
. : milestone, 15124000,
|
dd-trace-core/src/main/java/datadog/trace/core/flare/TracerFlareService.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/util/TracerDump.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/util/TracerDump.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/util/TracerDump.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/util/TracerDump.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/PendingTrace.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/util/TracerDump.java
Outdated
Show resolved
Hide resolved
Have you considered tackling this another way, by adding the reporting to |
4be2999
to
3e4955a
Compare
dd-trace-core/src/main/java/datadog/trace/core/PendingTraceBuffer.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/PendingTraceBuffer.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/PendingTraceBuffer.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/PendingTraceBuffer.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/PendingTraceBuffer.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/PendingTraceBuffer.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/PendingTraceBuffer.java
Outdated
Show resolved
Hide resolved
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.
Have drain and fill together feels way better! 🙌
Now, about using the collected elements:
- You can declare your comparator as a
private final Comparator<List<Span>> TRACE_BY_START_DATE
field so its meaning will be clear and it will only be allocated once - You will need to figure out how to filter, limit, and map your elements. I would recommend having a look at the Java
Stream
API - Now you get most of the part in place, try building some tests / triggering your code. You should be able to find some NPE by yourself 😉
dd-trace-core/src/main/java/datadog/trace/core/PendingTraceBuffer.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/PendingTraceBuffer.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/PendingTraceBuffer.java
Outdated
Show resolved
Hide resolved
5119ac7
to
3a8b13c
Compare
|
||
public class TraceDumpWriter implements Writer { | ||
|
||
private StringBuilder dumpText; |
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.
|
||
public class TraceDumpJsonExporter { | ||
|
||
private StringBuilder dumpText; |
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.
dd-trace-core/src/main/java/datadog/trace/core/PendingTraceBuffer.java
Outdated
Show resolved
Hide resolved
4f6a0db
to
9786fb5
Compare
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.
LGTM
cc @mcculls if you would like to check it before it gets merged
dd-trace-core/src/main/java/datadog/trace/core/PendingTraceBuffer.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/common/writer/TraceDumpJsonExporter.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/PendingTraceBuffer.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/PendingTraceBuffer.java
Outdated
Show resolved
Hide resolved
new Moshi.Builder() | ||
.add(DDSpanJsonAdapter.buildFactory(false)) | ||
.build() | ||
.adapter(Types.newParameterizedType(List.class, DDSpan.class)); |
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.
Any reason we don't use Collection.class
here, which would then let us use public void write(final Collection<DDSpan> trace) {
or if you want to keep it a bit more specific public void write(final Deque<DDSpan> trace) {
and avoid the need to copy span data into a temporary ArrayList
just to fit the expected interface?
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.
Initially it was because public void write(final List<DDSpan> trace)
has to be implemented regardless to override the writer
interface that declares the method. I'm thinking I could override the method with a dummy implementation and overload a new public void write(final Deque<DDSpan> trace) {
that has the actual implementation instead.
dd-trace-core/src/main/java/datadog/trace/core/PendingTraceBuffer.java
Outdated
Show resolved
Hide resolved
private static final class DumpDrain | ||
implements MessagePassingQueue.Consumer<Element>, MessagePassingQueue.Supplier<Element> { | ||
private static final DumpDrain DUMP_DRAIN = new DumpDrain(); | ||
private static final List<Element> DATA = new ArrayList<>(); |
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.
Can you make DATA
an instance field?
You could then introduce a method called List<Element> collectTraces()
which removes non-pending-trace elements, sorts it by oldest trace, then returns the data. You could also add a reset
method to clear the recorded data, which avoids the need to expose the internal collection - although note that would not compact the underlying array.
You might want to consider making the data
field volatile
- the collectTraces
method could then do the following:
- store the current
data
reference in a local variable - assign a
new ArrayList()
todata
- ready for the next dump request - return the local variable, i.e. the old
ArrayList
with the trace data
The main benefit this would bring is that there's a clear line between the writing and reading sides at the point we assign a new collection to data
. It would also allow the data
collection to be compacted, because we assign it a fresh ArrayList
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.
I'm not fully sure I understand the point of making data
volatile. From what I understand, it essentially allows us to "clear" the data
array in collectTraces()
by assigning it to a temp variable (whose memory will be cleared once the code exits the scope of the for-loop that calls the method, and instantiate a clean ArrayList for future traces to be stored until the next dump. Is this understanding correct?
.add(DDSpanJsonAdapter.buildFactory(false)) | ||
.build() | ||
.adapter(Types.newParameterizedType(Collection.class, DDSpan.class)); | ||
private StringBuilder dumpText; |
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.
dd-trace-core/src/main/java/datadog/trace/core/PendingTraceBuffer.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/PendingTraceBuffer.java
Outdated
Show resolved
Hide resolved
dd-trace-core/src/main/java/datadog/trace/core/PendingTraceBuffer.java
Outdated
Show resolved
Hide resolved
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.
+1 with some suggested improvements
also you might want to consider expanding your test to verify the expected content when there are multiple traces
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-datastore](https://github.com/googleapis/java-datastore) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `2.25.4` -> `2.26.0` | | [com.datadoghq:dd-trace-api](https://github.com/datadog/dd-trace-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `1.45.2` -> `1.46.0` | | [com.datadoghq:dd-trace-ot](https://github.com/datadog/dd-trace-java) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `1.45.2` -> `1.46.0` | | [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.9` -> `2.30.10` | | [software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.9` -> `2.30.10` | | [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.9` -> `2.30.10` | | [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.9` -> `2.30.10` | | [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.9` -> `2.30.10` | | [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.30.9` -> `2.30.10` | --- ### Release Notes <details> <summary>googleapis/java-datastore (com.google.cloud:google-cloud-datastore)</summary> ### [`v2.26.0`](https://github.com/googleapis/java-datastore/blob/HEAD/CHANGELOG.md#2260-2025-01-29) ##### Features - Add firestoreInDatastoreMode for datastore emulator ([#​1698](googleapis/java-datastore#1698)) ([50f106d](googleapis/java-datastore@50f106d)) ##### Dependencies - Update dependency com.google.cloud:sdk-platform-java-config to v3.42.0 ([#​1725](googleapis/java-datastore#1725)) ([1cbaf22](googleapis/java-datastore@1cbaf22)) </details> <details> <summary>datadog/dd-trace-java (com.datadoghq:dd-trace-api)</summary> ### [`v1.46.0`](https://github.com/DataDog/dd-trace-java/releases/tag/v1.46.0): 1.46.0 ##### Breaking Changes > \[!WARNING] > jnr-unixsocket is now an external dependency of dd-trace-ot and must be included when deploying dd-trace-ot. > \[!NOTE] > The API `TracerScope.setAsync(boolean)`, used to manually control asynchronous span propagation, does no more apply to the scope instance but to the active span scope. ##### Components ##### Application Security Management (IAST) - 🐛 Fix String.replace instrumentation for IAST ([#​8281](DataDog/dd-trace-java#8281) - [@​Mariovido](https://github.com/Mariovido)) - ✨ Apply the standard nomenclature to the stacktrace configs ([#​8244](DataDog/dd-trace-java#8244) - [@​jandro996](https://github.com/jandro996)) - 🐛 Exclude false positive weak randomness ([#​8232](DataDog/dd-trace-java#8232) - [@​jandro996](https://github.com/jandro996)) - ✨ Propagation of translateEscapes of String class ([#​8186](DataDog/dd-trace-java#8186) - [@​sezen-datadog](https://github.com/sezen-datadog)) - ✨ Add security control metrics ([#​8175](DataDog/dd-trace-java#8175) - [@​jandro996](https://github.com/jandro996)) - ✨ Increase IAST propagation to StringBuffer setLength ([#​8128](DataDog/dd-trace-java#8128) - [@​Mariovido](https://github.com/Mariovido)) - ✨ Add IAST taint tracking for DB values ([#​8072](DataDog/dd-trace-java#8072) - [@​Mariovido](https://github.com/Mariovido)) ##### Application Security Management (WAF) - 🐛 Prevents a NPE when there is no subscriber for user events ([#​8258](DataDog/dd-trace-java#8258) - [@​manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez)) - ✨ Apply the standard nomenclature to the stacktrace configs ([#​8244](DataDog/dd-trace-java#8244) - [@​jandro996](https://github.com/jandro996)) - 🐛 Ensure cached subscriptions are cleared on reconfiguration via RC ([#​8229](DataDog/dd-trace-java#8229) - [@​manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez)) - ✨ Add support for session tracking in Vertx ([#​8167](DataDog/dd-trace-java#8167) - [@​manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez)) - ✨ Create span tag: \_dd.appsec.rasp.timeout ([#​8269](DataDog/dd-trace-java#8269) - [@​Mariovido](https://github.com/Mariovido)) ##### Build & Tooling - 🐛 Ensure shaded helpers have unique names when injected into class-loaders ([#​8192](DataDog/dd-trace-java#8192) - [@​mcculls](https://github.com/mcculls)) ##### Configuration at Runtime - 🐛 Remove filtering of `DD_SERVICE` and `DD_ENV` from the tracer ([#​8176](DataDog/dd-trace-java#8176) - [@​mhlidd](https://github.com/mhlidd)) ##### Continuous Integration Visibility - 🧹 Generalize TestRetryPolicy to TestExecutionPolicy ([#​8302](DataDog/dd-trace-java#8302) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - 🧹 Parallelize CI Visibility settings requests ([#​8299](DataDog/dd-trace-java#8299) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - 🧹 Generalize test retry logic ([#​8289](DataDog/dd-trace-java#8289) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - 🧹 Generalize tests skipping logic ([#​8288](DataDog/dd-trace-java#8288) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - 🧹 Remove skip and shouldBeSkipped methods from TestEventsHandler in favor of isSkippable ([#​8286](DataDog/dd-trace-java#8286) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - ✨⚡ Optimize Git repository information computation ([#​8270](DataDog/dd-trace-java#8270) - [@​dougqh](https://github.com/dougqh)) - ✨ Always request known tests from the backend ([#​8268](DataDog/dd-trace-java#8268) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - ✨ Fix NPE when trying to get retry analyzer in Test NG ([#​8253](DataDog/dd-trace-java#8253) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - 🐛 Set test framework and test framework version tags atomically ([#​8252](DataDog/dd-trace-java#8252) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - ✨ Add debug logging to Android Gradle module layout logic ([#​8251](DataDog/dd-trace-java#8251) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - 🐛 Fix source and destination folders computation for Android Gradle projects ([#​8190](DataDog/dd-trace-java#8190) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) - ✨ Add basic Scala Weaver sbt support ([#​8189](DataDog/dd-trace-java#8189) - [@​daniel-mohedano](https://github.com/daniel-mohedano)) - ✨ Implement impacted tests detection ([#​8188](DataDog/dd-trace-java#8188) - [@​nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog)) ##### Data Streams Monitoring - ✨ Change hash computation for protobuf to better represent impacting changes + save proto number in schema ([#​8201](DataDog/dd-trace-java#8201) - [@​vandonr](https://github.com/vandonr)) ##### Database Monitoring - Add peer service tag in dbm sql commenter ([#​7913](DataDog/dd-trace-java#7913) - [@​jordan-wong](https://github.com/jordan-wong)) ##### Dynamic Instrumentation - ✨ Add support for SymDB to scan directories ([#​8306](DataDog/dd-trace-java#8306) - [@​jpbempel](https://github.com/jpbempel)) - ✨ Add SymDB report for any jar scanning failures ([#​8300](DataDog/dd-trace-java#8300) - [@​jpbempel](https://github.com/jpbempel)) - ✨ Use two budgets depending on type ([#​8283](DataDog/dd-trace-java#8283) - [@​evanchooly](https://github.com/evanchooly)) - ✨ Institute a 10 snapshot per probe per trace budget ([#​8277](DataDog/dd-trace-java#8277) - [@​evanchooly](https://github.com/evanchooly)) - 🐛 Avoid double snapshots for Exception Replay ([#​8273](DataDog/dd-trace-java#8273) - [@​jpbempel](https://github.com/jpbempel)) - ✨ Simplify code origins. Separate out snapshot generation. ([#​8263](DataDog/dd-trace-java#8263) - [@​evanchooly](https://github.com/evanchooly)) - ✨ Add Exception probe custom instrumentation ([#​8230](DataDog/dd-trace-java#8230) - [@​jpbempel](https://github.com/jpbempel)) - ✨ Enhance log probes to honor debug session tags ([#​8215](DataDog/dd-trace-java#8215) - [@​evanchooly](https://github.com/evanchooly)) - 🐛 Don't redact env tokens from debugger probe snapshots ([#​8211](DataDog/dd-trace-java#8211) - [@​watson](https://github.com/watson)) - ✨⚡ Move Trace/SpanId capture at commit time ([#​8184](DataDog/dd-trace-java#8184) - [@​jpbempel](https://github.com/jpbempel)) - 🐛 Capture values at entry for method probe ([#​8169](DataDog/dd-trace-java#8169) - [@​jpbempel](https://github.com/jpbempel)) ##### JMX fetch - 🐛 Mute JMXFetch Shutdown in progress error ([#​8068](DataDog/dd-trace-java#8068) - [@​ygree](https://github.com/ygree)) ##### OpenTracing -⚠️ 🧹 Make jnr-unixsocket an explicit dependency of dd-trace-ot ([#​8307](DataDog/dd-trace-java#8307) - [@​mcculls](https://github.com/mcculls)) ##### Profiling - 🐛 Avoid unsupported API call for creating folders on windows ([#​8304](DataDog/dd-trace-java#8304) - [@​jbachorik](https://github.com/jbachorik)) - ✨ Tag profiles for serverless ([#​8279](DataDog/dd-trace-java#8279) - [@​jbachorik](https://github.com/jbachorik)) - ✨ add queue type and length to queue events ([#​8242](DataDog/dd-trace-java#8242) - [@​richardstartin](https://github.com/richardstartin)) - 🐛 TempLocationManager Fixes and Improvements ([#​8191](DataDog/dd-trace-java#8191) - [@​jbachorik](https://github.com/jbachorik)) - ✨ Bump ddprof to 1.18.0 ([#​8173](DataDog/dd-trace-java#8173) - [@​jbachorik](https://github.com/jbachorik)) - ✨ Report profiler initialization and configuration errors to telemetry ([#​8171](DataDog/dd-trace-java#8171) - [@​jbachorik](https://github.com/jbachorik)) ##### Telemetry - ✨ Add pending traces report in tracer flares ([#​8053](DataDog/dd-trace-java#8053) - [@​mhlidd](https://github.com/mhlidd)) ##### Testing - ✨ Test http server requests in parallel ([#​8222](DataDog/dd-trace-java#8222) - [@​amarziali](https://github.com/amarziali)) ##### Trace context propagation - ✨ Add non default propagator registration ([#​8310](DataDog/dd-trace-java#8310) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) ##### Tracer core - ✨ Probe for existence of IBMSASL or ACCP security providers ([#​8276](DataDog/dd-trace-java#8276) - [@​mcculls](https://github.com/mcculls)) - ✨⚡ Overhead improvement to agent feedback based sampling ([#​8265](DataDog/dd-trace-java#8265) - [@​dougqh](https://github.com/dougqh)) - 🧹 Move async propagation API from scope to tracer ([#​8231](DataDog/dd-trace-java#8231) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) - ✨ Introduce context propagation API ([#​8161](DataDog/dd-trace-java#8161) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) - ✨🧪 Use env-entry to add tags per webapp deployment ([#​8138](DataDog/dd-trace-java#8138) - [@​amarziali](https://github.com/amarziali)) - ✨ Introduce context helpers API ([#​8134](DataDog/dd-trace-java#8134) - [@​PerfectSlayer](https://github.com/PerfectSlayer)) - ✨ Support IPv6 values for `DD_AGENT_HOST` and `DD_TRACE_AGENT_URL` ([#​7984](DataDog/dd-trace-java#7984) - [@​mhlidd](https://github.com/mhlidd)) ##### Instrumentations ##### Apache HttpComponents - 🐛 Properly finish spans and support latest apache httpclient5 ([#​8272](DataDog/dd-trace-java#8272) - [@​amarziali](https://github.com/amarziali)) ##### AWS Lambda instrumentation - 🐛 Properly capture lambda payloads for all handler types. ([#​8264](DataDog/dd-trace-java#8264) - [@​purple4reina](https://github.com/purple4reina)) ##### AWS S3 instrumentation - 💡 Create S3 instrumentation + add span pointers ([#​8075](DataDog/dd-trace-java#8075) - [@​nhulston](https://github.com/nhulston)) ##### AWS SDK instrumentation - 🐛 Revert "Add avoid double instrumenting lambda non-streaming handlers." ([#​8247](DataDog/dd-trace-java#8247) - [@​nhulston](https://github.com/nhulston)) ##### Cassandra - ✨ Allow extracting keyspace from statement result ([#​8239](DataDog/dd-trace-java#8239) - [@​amarziali](https://github.com/amarziali)) ##### Core Java language instrumentation - ✨ Propagation of translateEscapes of String class ([#​8186](DataDog/dd-trace-java#8186) - [@​sezen-datadog](https://github.com/sezen-datadog)) ##### Eclipse Vert.x instrumentation - 🐛 Fix vertx worker propagation and error handling ([#​8237](DataDog/dd-trace-java#8237) - [@​amarziali](https://github.com/amarziali)) - ✨ Support vertx 5 ([#​8220](DataDog/dd-trace-java#8220) - [@​amarziali](https://github.com/amarziali)) - ✨ Add support for session tracking in Vertx ([#​8167](DataDog/dd-trace-java#8167) - [@​manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez)) ##### Kafka instrumentation - 🐛 Prevent possible NPE calculating Kafka record header size ([#​8292](DataDog/dd-trace-java#8292) - [@​ygree](https://github.com/ygree)) ##### Mule instrumentation - 🐛 Fix crash using Mule with JPMS ([#​8187](DataDog/dd-trace-java#8187) - [@​amarziali](https://github.com/amarziali)) ##### Protocol Buffer instrumentation - ✨ Change hash computation for protobuf to better represent impacting changes + save proto number in schema ([#​8201](DataDog/dd-trace-java#8201) - [@​vandonr](https://github.com/vandonr)) ##### Spring instrumentation - 🐛 Preserve getQualifier from spring scheduling runnables ([#​8293](DataDog/dd-trace-java#8293) - [@​amarziali](https://github.com/amarziali)) </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**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- 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: bb09d47e4eed77a003f630273b4d0a84003eb899
What Does This Do
APMAPI-906
Creates a TracerFlare Dump in order to dump traces that have been captured but not yet sent to the agent. This PR introduces a new
DUMP_DRAIN
element in order to properly extract the pending traces and sends such traces to aJsonExporter
in order to write them into theTracerFlare
as Json. These traces will be displayed from oldest first and are currently limited to 50 traces in a dump.Motivation
This PR will help with solving customer issues where traces are captured but not sent to the agent because the root span is never finished/written.
Additional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: APMAPI-906