Skip to content

Commit 84dc914

Browse files
authored
Merge branch 'master' into mhlidd/run_spock_with_strict
2 parents b618154 + ca975c2 commit 84dc914

File tree

33 files changed

+662
-490
lines changed

33 files changed

+662
-490
lines changed

.gitlab/benchmarks/bp-runner.fail-on-breach.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Generated: 2026-03-31
33
#
44
# Generation Strategy: tight
5-
# Formula: CI_bound / (1 ± T) (T = 5.0%)
5+
# Formula: CI_bound / (1 ± T) (T = 10.0%)
66
#
77
# SLO Checking:
88
# - BREACH: 90% CI boundary crosses threshold
@@ -11,7 +11,7 @@
1111
# DO NOT EDIT MANUALLY - Regenerate using:
1212
# benchmark_analyzer generate slos --help
1313
#
14-
# Thresholds set based on guidance in https://datadoghq.atlassian.net/wiki/x/LgI1LgE#How-to-choose-thresholds-for-pre-release-gates%3F
14+
# link to documentation on autogenerated thresholds https://github.com/DataDog/relenv-benchmark-analyzer/blob/main/README.md#generate-slo-thresholds
1515

1616
experiments:
1717
- name: Run SLO breach check
@@ -31,7 +31,7 @@ experiments:
3131
# https://benchmarking.us1.prod.dog/trends?projectId=4&branch=master&trendsTab=per_scenario&scenario=normal_operation%2Fonly-tracing&trendsType=scenario
3232
- name: normal_operation/only-tracing
3333
thresholds:
34-
- agg_http_req_duration_p50 < 2.128 ms
34+
- agg_http_req_duration_p50 < 2.526 ms
3535
- agg_http_req_duration_p99 < 8.5 ms
3636
# https://benchmarking.us1.prod.dog/trends?projectId=4&branch=master&trendsTab=per_scenario&scenario=normal_operation%2Fotel-latest&trendsType=scenario
3737
- name: normal_operation/otel-latest

.gitlab/one-pipeline.locked.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# DO NOT EDIT THIS FILE MANUALLY
22
# This file is auto-generated by automation.
33
include:
4-
- remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/9cf7d7609ff62e4723c9cbc061ca2a25345ce5d6055b9acad9a13dbf736261f0/one-pipeline.yml
4+
- remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/4667b01c6ae983f92ecf106e110ced3dac798b229cf2a0539c58aa22e95a99d5/one-pipeline.yml

communication/src/test/java/datadog/communication/serialization/msgpack/MsgPackWriterTest.java

Lines changed: 114 additions & 144 deletions
Large diffs are not rendered by default.

components/json/src/test/java/datadog/json/JsonReaderTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ void testStringEscaping() {
215215
assertEquals("\n", reader.nextString());
216216
assertEquals("\r", reader.nextString());
217217
assertEquals("\t", reader.nextString());
218-
assertEquals("É", reader.nextString());
218+
// Explicit escape for non-ASCII `É` to make test independent of container settings.
219+
assertEquals("\u00C9", reader.nextString());
219220
reader.endArray();
220221
} catch (IOException e) {
221222
fail("Failed to read escaped JSON strings", e);

dd-java-agent/agent-crashtracking/gradle.lockfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ com.github.stephenc.jcip:jcip-annotations:1.0-1=spotbugs
3232
com.google.code.findbugs:jsr305:3.0.2=compileClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath
3333
com.google.code.gson:gson:2.13.2=spotbugs
3434
com.google.errorprone:error_prone_annotations:2.41.0=spotbugs
35+
com.jayway.jsonpath:json-path:2.8.0=testCompileClasspath,testRuntimeClasspath
3536
com.squareup.moshi:moshi:1.11.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
3637
com.squareup.okhttp3:mockwebserver:3.12.12=testCompileClasspath,testRuntimeClasspath
3738
com.squareup.okhttp3:okhttp:3.12.12=testCompileClasspath,testRuntimeClasspath
@@ -45,6 +46,11 @@ junit:junit:4.13.2=testCompileClasspath,testRuntimeClasspath
4546
net.bytebuddy:byte-buddy-agent:1.18.3=testCompileClasspath,testRuntimeClasspath
4647
net.bytebuddy:byte-buddy:1.18.3=testCompileClasspath,testRuntimeClasspath
4748
net.java.dev.jna:jna:5.13.0=testCompileClasspath,testRuntimeClasspath
49+
net.javacrumbs.json-unit:json-unit-assertj:2.40.1=testCompileClasspath,testRuntimeClasspath
50+
net.javacrumbs.json-unit:json-unit-core:2.40.1=testCompileClasspath,testRuntimeClasspath
51+
net.javacrumbs.json-unit:json-unit-json-path:2.40.1=testCompileClasspath,testRuntimeClasspath
52+
net.minidev:accessors-smart:2.4.9=testRuntimeClasspath
53+
net.minidev:json-smart:2.4.10=testRuntimeClasspath
4854
net.sf.saxon:Saxon-HE:12.9=spotbugs
4955
org.apache.ant:ant-antlr:1.10.14=codenarc
5056
org.apache.ant:ant-junit:1.10.14=codenarc
@@ -55,6 +61,7 @@ org.apache.commons:commons-text:1.14.0=spotbugs
5561
org.apache.logging.log4j:log4j-api:2.25.2=spotbugs
5662
org.apache.logging.log4j:log4j-core:2.25.2=spotbugs
5763
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
64+
org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath
5865
org.codehaus.groovy:groovy-ant:3.0.23=codenarc
5966
org.codehaus.groovy:groovy-docgenerator:3.0.23=codenarc
6067
org.codehaus.groovy:groovy-groovydoc:3.0.23=codenarc
@@ -67,7 +74,7 @@ org.codehaus.groovy:groovy:3.0.25=testCompileClasspath,testRuntimeClasspath
6774
org.codenarc:CodeNarc:3.7.0=codenarc
6875
org.dom4j:dom4j:2.2.0=spotbugs
6976
org.gmetrics:GMetrics:2.1.0=codenarc
70-
org.hamcrest:hamcrest-core:1.3=testCompileClasspath,testRuntimeClasspath
77+
org.hamcrest:hamcrest-core:2.2=testCompileClasspath,testRuntimeClasspath
7178
org.hamcrest:hamcrest:3.0=testCompileClasspath,testRuntimeClasspath
7279
org.jacoco:org.jacoco.agent:0.8.14=jacocoAgent,jacocoAnt
7380
org.jacoco:org.jacoco.ant:0.8.14=jacocoAnt

dd-java-agent/agent-crashtracking/src/test/java/datadog/crashtracking/buildid/BuildIdExtractorIntegrationTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
package datadog.crashtracking.buildid;
22

3+
import static datadog.environment.OperatingSystem.Architecture.ARM64;
34
import static org.junit.jupiter.api.Assertions.assertEquals;
45
import static org.junit.jupiter.api.Assertions.assertNotNull;
56
import static org.junit.jupiter.api.Assertions.assertTrue;
7+
import static org.junit.jupiter.api.Assumptions.assumeFalse;
68

9+
import datadog.environment.OperatingSystem;
710
import java.io.IOException;
811
import java.nio.file.Files;
912
import java.nio.file.Path;
@@ -134,6 +137,8 @@ private static Stream<Arguments> elfBinaries() {
134137
@ParameterizedTest(name = "ELF: {1}")
135138
@MethodSource("elfBinaries")
136139
void testElfBuildIdExtraction(String containerPath, String description) throws Exception {
140+
// TODO: check if arm64 can be supported too.
141+
assumeFalse(OperatingSystem.architecture() == ARM64, "Skipping for arm64");
137142
Path localBinary = copyFromContainer(linuxContainer, containerPath);
138143

139144
ElfBuildIdExtractor extractor = new ElfBuildIdExtractor();

dd-java-agent/agent-debugger/src/main/java/com/datadog/debugger/probe/LogProbe.java

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,6 @@ private void processCaptureExpressions(CapturedContext context, LogStatus logSta
730730
captureExpression.getName(), Object.class.getTypeName(), null));
731731
} else {
732732
if (captureExpression.capture != null) {
733-
Value.toCapturedSnapshot(captureExpression.getName(), result);
734733
context.addCaptureExpression(
735734
Value.toCapturedSnapshot(
736735
captureExpression.getName(),
@@ -740,8 +739,20 @@ private void processCaptureExpressions(CapturedContext context, LogStatus logSta
740739
captureExpression.capture.maxLength,
741740
captureExpression.capture.maxFieldCount));
742741
} else {
743-
context.addCaptureExpression(
744-
Value.toCapturedSnapshot(captureExpression.getName(), result));
742+
// inherit from probe capture field because no specific capture
743+
if (capture != null) {
744+
context.addCaptureExpression(
745+
Value.toCapturedSnapshot(
746+
captureExpression.getName(),
747+
result,
748+
capture.maxReferenceDepth,
749+
capture.maxCollectionSize,
750+
capture.maxLength,
751+
capture.maxFieldCount));
752+
} else {
753+
context.addCaptureExpression(
754+
Value.toCapturedSnapshot(captureExpression.getName(), result));
755+
}
745756
}
746757
}
747758
} catch (EvaluationException ex) {

dd-java-agent/agent-debugger/src/test/java/com/datadog/debugger/agent/CapturedSnapshotTest.java

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3028,6 +3028,47 @@ public void captureExpressionsWithCaptureLimits() throws IOException, URISyntaxE
30283028
assertEquals("depth", fldValue.getNotCapturedReason());
30293029
}
30303030

3031+
@Test
3032+
public void captureExpressionsWithInheritedCaptureLimits()
3033+
throws IOException, URISyntaxException {
3034+
final String CLASS_NAME = "CapturedSnapshot08";
3035+
LogProbe probe =
3036+
createProbeBuilder(PROBE_ID, CLASS_NAME, "doit", null)
3037+
.evaluateAt(MethodLocation.EXIT)
3038+
.captureSnapshot(false)
3039+
.capture(new LogProbe.Capture(1, 10, 3, 1))
3040+
.captureExpressions(
3041+
Arrays.asList(
3042+
new LogProbe.CaptureExpression(
3043+
"typed_fld_fld_msg",
3044+
new ValueScript(
3045+
DSL.getMember(
3046+
DSL.getMember(DSL.getMember(DSL.ref("typed"), "fld"), "fld"),
3047+
"msg"),
3048+
"typed.fld.fld.msg"),
3049+
null),
3050+
new LogProbe.CaptureExpression(
3051+
"typed", new ValueScript(DSL.ref("typed"), "typed"), null)))
3052+
.build();
3053+
TestSnapshotListener listener = installProbes(probe);
3054+
Class<?> testClass = compileAndLoadClass(CLASS_NAME);
3055+
int result = Reflect.onClass(testClass).call("main", "1").get();
3056+
assertEquals(3, result);
3057+
Snapshot snapshot = assertOneSnapshot(listener);
3058+
CapturedContext.CapturedValue msgValue =
3059+
deserializeCapturedValue(
3060+
snapshot.getCaptures().getReturn().getCaptureExpressions().get("typed_fld_fld_msg"));
3061+
assertEquals("hel", msgValue.getValue());
3062+
assertEquals("truncated", msgValue.getNotCapturedReason());
3063+
CapturedContext.CapturedValue typedValue =
3064+
deserializeCapturedValue(
3065+
snapshot.getCaptures().getReturn().getCaptureExpressions().get("typed"));
3066+
Map<String, CapturedContext.CapturedValue> fields =
3067+
(Map<String, CapturedContext.CapturedValue>) typedValue.getValue();
3068+
CapturedContext.CapturedValue fldValue = fields.get("fld");
3069+
assertEquals("depth", fldValue.getNotCapturedReason());
3070+
}
3071+
30313072
@Test
30323073
public void methodParametersAttribute() throws Exception {
30333074
final String CLASS_NAME = "CapturedSnapshot01";

dd-java-agent/agent-otel/otel-bootstrap/src/main/java/datadog/trace/bootstrap/otel/metrics/data/OtelHistogramSketch.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,20 @@ OtlpDataPoint doCollect(boolean reset) {
2929
List<Double> binBoundaries;
3030
List<Double> binCounts;
3131
double sum;
32+
double min;
33+
double max;
3234
synchronized (histogram) {
3335
count = histogram.getCount();
3436
binBoundaries = histogram.getBinBoundaries();
3537
binCounts = histogram.getBinCounts();
3638
sum = histogram.getSum();
39+
min = histogram.getMinValue();
40+
max = histogram.getMaxValue();
3741
if (reset) {
3842
histogram.clear();
3943
}
4044
}
41-
return new OtlpHistogramPoint(count, binBoundaries, binCounts, sum);
45+
return new OtlpHistogramPoint(count, binBoundaries, binCounts, sum, min, max);
4246
}
4347

4448
/** Truncate IEEE-754 floating-point value to 10 bits precision. */

dd-java-agent/agent-otel/otel-bootstrap/src/main/java/datadog/trace/bootstrap/otel/metrics/data/OtlpHistogramPoint.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,21 @@ public final class OtlpHistogramPoint extends OtlpDataPoint {
77
public final List<Double> bucketBoundaries;
88
public final List<Double> bucketCounts;
99
public final double sum;
10+
public final double min;
11+
public final double max;
1012

1113
OtlpHistogramPoint(
12-
double count, List<Double> bucketBoundaries, List<Double> bucketCounts, double sum) {
14+
double count,
15+
List<Double> bucketBoundaries,
16+
List<Double> bucketCounts,
17+
double sum,
18+
double min,
19+
double max) {
1320
this.count = count;
1421
this.bucketBoundaries = bucketBoundaries;
1522
this.bucketCounts = bucketCounts;
1623
this.sum = sum;
24+
this.min = min;
25+
this.max = max;
1726
}
1827
}

0 commit comments

Comments
 (0)