Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1168c35
log-injection: capture thread dump of forked process on smoketest tim…
bm1549 May 27, 2026
ff45ab0
chore(ci): bump the gh-actions-packages group with 2 updates (#11464)
dependabot[bot] May 27, 2026
00e6aa4
Bump java-profiler to 1.43.0 for critical stability fixes (#11475)
jbachorik May 27, 2026
56c6e87
Clean up dependency_age script (#11477)
sarahchen6 May 27, 2026
8130646
Fix runner dashboard image filters (#11467)
bric3 May 28, 2026
ff6fca7
chore: add VisibleForTesting annotation (#11473)
bric3 May 28, 2026
d140367
Reduce wait time for test job to run as soon as their needed build jo…
bric3 May 28, 2026
1d12490
Add MpscRingBuffer for pre-allocated, recyclable slot rings
dougqh May 28, 2026
16b2ec6
Add throughput benchmarks for MpscRingBuffer
dougqh May 28, 2026
e67dde7
Add RingVsQueueBenchmark for MpscRingBuffer vs MpscArrayQueue
dougqh May 28, 2026
059063f
Merge dougqh/ring-buffer into dougqh/css-ring-buffer
dougqh May 28, 2026
7ec3f11
Swap CSS inbox for MpscRingBuffer of mutable SpanSnapshot slots
dougqh May 28, 2026
cec6abf
Document MpscRingBuffer thread-safety contract; publish on filler throw
dougqh May 28, 2026
1940355
Merge dougqh/ring-buffer into dougqh/css-ring-buffer
dougqh May 28, 2026
9162a1e
Use AtomicLongFieldUpdater for the producer cursor
dougqh May 28, 2026
12984ac
Merge dougqh/ring-buffer: pick up AtomicLongFieldUpdater change
dougqh May 28, 2026
e8ead01
Pad MpscRingBuffer cursors and stride publishedSequences
dougqh May 28, 2026
fed8238
Merge dougqh/ring-buffer: cache-line padding + stride
dougqh May 28, 2026
ef046be
Shrink tracer.metrics defaults at Xmx<128m for the ring buffer
dougqh May 28, 2026
525599e
Cut default tracer.metrics.max.pending from 2048 to 128
dougqh May 28, 2026
c31715f
Reuse peerTagValues array across publishes via slot-owned scratch
dougqh May 28, 2026
7e6f497
Add MpscRingBuffer.tryClaim(n) batch-claim API
dougqh May 28, 2026
01754a5
Merge dougqh/ring-buffer: pick up tryClaim(n)/Batch API
dougqh May 28, 2026
3324952
Use Batch claim for CSS publish(trace)
dougqh May 28, 2026
780a204
Add low-level tryClaimRange/slotAt/publish primitives to MpscRingBuffer
dougqh May 28, 2026
f18a73e
Merge dougqh/ring-buffer: pick up low-level primitives
dougqh May 28, 2026
32c69d1
Use MpscRingBuffer low-level primitives in publish(trace)
dougqh May 28, 2026
e4277d0
Fix stale Javadoc reference to removed slotFiller field
dougqh May 28, 2026
fb14c62
Overclaim + skip-sentinel in CSS publish(trace): one pass, no Batch
dougqh May 28, 2026
e29b802
Use PendingTrace pre-counted eligible-span count for exact CSS ring c…
dougqh May 28, 2026
21b5bd7
Revert "Use PendingTrace pre-counted eligible-span count for exact CS…
dougqh May 28, 2026
a39ede1
Park/unpark aggregator and cache PeerTagSchema.namesHash
dougqh May 29, 2026
c330d9c
Canonicalize + hash on the producer; identity matches on the aggregator
dougqh May 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/scripts/dependency_age.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,10 @@ def build_validation_summary(
if old_gav not in seen:
seen.add(old_gav)
if new_gav in baseline_coords:
continue # no-op downgrade — replacement matches baseline
lines.append(f"- `{old_gav}` is {hours_remaining}h away from meeting {min_age_hours}h cooldown, updated to `{new_gav}`")
lines.append(f"- `{old_gav}` is {hours_remaining}h away from meeting {min_age_hours}h cooldown, reverted")
else:
new_version = new_gav.rsplit(":", 1)[1]
lines.append(f"- `{old_gav}` is {hours_remaining}h away from meeting {min_age_hours}h cooldown, updated to `{new_version}`")
for entries in violations_by_file.values():
for gav, kind, hours_remaining in entries:
if gav not in seen:
Expand All @@ -462,8 +464,6 @@ def build_validation_summary(
lines.append(f"- `{gav}` — cannot verify age, reverted")
else:
lines.append(f"- `{gav}` is {hours_remaining}h away from meeting {min_age_hours}h cooldown, reverted")
if len(lines) == 2:
return "" # only header, no entries after filtering
return "\n".join(lines)


Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/analyze-changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
${{ runner.os }}-gradle-

- name: Initialize CodeQL
uses: github/codeql-action/init@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
uses: github/codeql-action/init@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
with:
languages: 'java'
build-mode: 'manual'
Expand All @@ -43,7 +43,7 @@ jobs:
./gradlew clean :dd-java-agent:shadowJar --build-cache --parallel --stacktrace --no-daemon --max-workers=4

- name: Perform CodeQL Analysis and upload results to GitHub Security tab
uses: github/codeql-action/analyze@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
uses: github/codeql-action/analyze@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0

trivy:
name: Analyze changes with Trivy
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
uses: github/codeql-action/upload-sarif@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
if: always()
with:
sarif_file: 'trivy-results.sarif'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prune-old-pull-requests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
pull-requests: write
steps:
- name: Prune old pull requests
uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
uses: actions/stale@eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899 # v10.3.0
with:
days-before-stale: -1 # Disable general stale bot
days-before-pr-stale: 90 # Only enable stale bot for PRs with no activity for 90 days
Expand Down
58 changes: 54 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ default:
fi

echo -e "${TEXT_BOLD}${TEXT_YELLOW}Runner dashboard, these are live (limited to a 1-hour window, and expire after 36 hours)${TEXT_CLEAR}"
echo -e "${TEXT_BOLD}${TEXT_YELLOW} Containers:${TEXT_CLEAR} https://app.datadoghq.com/containers?${TIME_PARAMS}query=image_name%3A%2A%2Fdatadog%2Fdd-trace-java-docker-build%20AND%20pod_name%3A${POD_NAME}&live=false"
echo -e "${TEXT_BOLD}${TEXT_YELLOW} Processes:${TEXT_CLEAR} https://app.datadoghq.com/process?${TIME_PARAMS}query=image_name%3A%2A%2Fdatadog%2Fdd-trace-java-docker-build%20AND%20pod_name%3A${POD_NAME}&live=false"
echo -e "${TEXT_BOLD}${TEXT_YELLOW} Containers:${TEXT_CLEAR} https://app.datadoghq.com/containers?${TIME_PARAMS}query=image_name%3A%2A%2Fdd-trace-java-docker-build%20AND%20pod_name%3A${POD_NAME}&live=false"
echo -e "${TEXT_BOLD}${TEXT_YELLOW} Processes:${TEXT_CLEAR} https://app.datadoghq.com/process?${TIME_PARAMS}query=image_name%3A%2A%2Fdd-trace-java-docker-build%20AND%20pod_name%3A${POD_NAME}&live=false"

.gitlab_base_ref_params: &gitlab_base_ref_params
- |
Expand Down Expand Up @@ -548,7 +548,15 @@ check_debugger:

muzzle:
extends: .gradle_build
needs: [ build_tests ]
# needs:parallel:matrix limits this job to a specific build_tests combination.
# Keep matrix vars exact and in build_tests declaration order:
# https://docs.gitlab.com/ci/yaml/#needsparallelmatrix
needs: &needs_build_tests_inst
- job: build_tests
parallel:
matrix:
- GRADLE_TARGET: ":instrumentationTest"
CACHE_TYPE: "inst"
stage: tests
rules:
- if: '$CI_COMMIT_BRANCH =~ /^mq-working-branch-/'
Expand Down Expand Up @@ -586,7 +594,7 @@ muzzle:

muzzle-dep-report:
extends: .gradle_build
needs: [ build_tests ]
needs: *needs_build_tests_inst
stage: tests
rules:
- if: '$CI_COMMIT_BRANCH =~ /^mq-working-branch-/'
Expand Down Expand Up @@ -737,6 +745,15 @@ agent_integration_tests:

test_base:
extends: .test_job
# needs:parallel:matrix limits this job to a specific build_tests combination.
# Keep matrix vars exact and in build_tests declaration order:
# https://docs.gitlab.com/ci/yaml/#needsparallelmatrix
needs:
- job: build_tests
parallel:
matrix:
- GRADLE_TARGET: ":baseTest"
CACHE_TYPE: "base"
variables:
GRADLE_TARGET: ":baseTest"
CACHE_TYPE: "base"
Expand All @@ -748,6 +765,7 @@ test_base:

test_inst:
extends: .test_job_with_test_agent
needs: *needs_build_tests_inst
variables:
GRADLE_TARGET: ":instrumentationTest"
CACHE_TYPE: "inst"
Expand All @@ -756,6 +774,15 @@ test_inst:

test_inst_latest:
extends: .test_job_with_test_agent
# needs:parallel:matrix limits this job to a specific build_tests combination.
# Keep matrix vars exact and in build_tests declaration order:
# https://docs.gitlab.com/ci/yaml/#needsparallelmatrix
needs:
- job: build_tests
parallel:
matrix:
- GRADLE_TARGET: ":instrumentationLatestDepTest"
CACHE_TYPE: "latestdep"
variables:
GRADLE_TARGET: ":instrumentationLatestDepTest"
CACHE_TYPE: "latestdep"
Expand Down Expand Up @@ -786,6 +813,7 @@ test_flaky:

test_flaky_inst:
extends: .test_job
needs: *needs_build_tests_inst
variables:
GRADLE_TARGET: ":instrumentationTest"
GRADLE_PARAMS: "-PrunFlakyTests"
Expand All @@ -800,6 +828,15 @@ test_flaky_inst:

test_profiling:
extends: .test_job
# needs:parallel:matrix limits this job to a specific build_tests combination.
# Keep matrix vars exact and in build_tests declaration order:
# https://docs.gitlab.com/ci/yaml/#needsparallelmatrix
needs:
- job: build_tests
parallel:
matrix:
- GRADLE_TARGET: ":profilingTest"
CACHE_TYPE: "profiling"
variables:
GRADLE_TARGET: ":profilingTest"
CACHE_TYPE: "profiling"
Expand All @@ -819,6 +856,16 @@ test_debugger:

test_smoke:
extends: .test_job
# needs:parallel:matrix limits this job to a specific build_tests combination.
# Keep matrix vars exact and in build_tests declaration order:
# https://docs.gitlab.com/ci/yaml/#needsparallelmatrix
needs: &needs_build_tests_smoke
- job: build_tests
parallel:
matrix:
- GRADLE_TARGET: ":smokeTest"
CACHE_TYPE: "smoke"
MAVEN_OPTS: "-Xms256M -Xmx1024M"
variables:
GRADLE_TARGET: "stageMainDist :smokeTest"
GRADLE_PARAMS: "-PskipFlakyTests"
Expand All @@ -828,6 +875,7 @@ test_smoke:

test_ssi_smoke:
extends: .test_job
needs: *needs_build_tests_smoke
rules:
- if: $CI_COMMIT_BRANCH == "master"
when: on_success
Expand All @@ -845,6 +893,7 @@ test_ssi_smoke:

test_smoke_graalvm:
extends: .test_job
needs: *needs_build_tests_smoke
tags: [ "arch:amd64" ]
variables:
GRADLE_TARGET: "stageMainDist :dd-smoke-test:spring-boot-3.0-native:test"
Expand All @@ -857,6 +906,7 @@ test_smoke_graalvm:

test_smoke_semeru8_debugger:
extends: .test_job
needs: *needs_build_tests_smoke
tags: [ "arch:amd64" ]
variables:
GRADLE_TARGET: "stageMainDist dd-smoke-tests:debugger-integration-tests:test"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package datadog.communication.serialization;

import datadog.trace.api.internal.VisibleForTesting;
import java.nio.ByteBuffer;

public final class FlushingBuffer implements StreamingBuffer {
Expand Down Expand Up @@ -106,7 +107,7 @@ public void reset() {
mark = 0;
}

// for tests only
@VisibleForTesting
int getMessageCount() {
return messageCount;
}
Expand Down
1 change: 1 addition & 0 deletions components/annotations/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
apply(from = "$rootDir/gradle/java.gradle")
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package datadog.trace.api.internal;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.SOURCE)
@Target({ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD, ElementType.TYPE})
public @interface VisibleForTesting {}
4 changes: 4 additions & 0 deletions components/environment/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ plugins {

apply(from = "$rootDir/gradle/java.gradle")

dependencies {
compileOnly(project(":components:annotations"))
}

/*
* Add an addition gradle configuration to be consumed by bootstrap only.
* "datadog.trace." prefix is required to be excluded from Jacoco instrumentation.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package datadog.environment;

import datadog.trace.api.internal.VisibleForTesting;
import java.util.List;
import java.util.Locale;
import javax.annotation.Nullable;
Expand Down Expand Up @@ -212,7 +213,7 @@ public Runtime() {
SystemProperties.get("java.vendor.version"));
}

// Only visible for testing
@VisibleForTesting
Runtime(String javaVer, String rtVer, String name, String vendor, String vendorVersion) {
this.name = name == null ? "" : name;
this.vendor = vendor == null ? "" : vendor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import static java.util.Collections.emptyList;
import static java.util.Collections.singletonList;

import datadog.trace.api.internal.VisibleForTesting;
import de.thetaphi.forbiddenapis.SuppressForbidden;
import java.io.BufferedReader;
import java.io.IOException;
Expand Down Expand Up @@ -93,7 +94,7 @@ private List<String> findVmOptions() {

// Be aware that when running a native image, the command line in /proc/self/cmdline is just the
// executable
// Visible for testing
@VisibleForTesting
List<String> findVmOptionsFromProcFs(String[] procfsCmdline) {
// Create the list of VM options
List<String> vmOptions = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package datadog.trace.bootstrap;

import datadog.trace.api.internal.VisibleForTesting;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.List;
Expand Down Expand Up @@ -30,7 +31,7 @@ public static Throwable recordError(Throwable error) {
return error; // keep throwable at top of the stack
}

// Visible for testing
@VisibleForTesting
public static void resetErrors() {
COUNTER.set(0);
if (detailed) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package datadog.trace.bootstrap;

import datadog.trace.api.internal.VisibleForTesting;

/**
* Weak {@link ContextStore} that acts as a fall-back when field-injection isn't possible.
*
Expand Down Expand Up @@ -85,7 +87,7 @@ public V remove(final K key) {
return (V) map.remove(key);
}

// Package reachable for testing
@VisibleForTesting
int size() {
return map.size();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import datadog.appsec.api.blocking.BlockingContentType;
import datadog.trace.api.Config;
import datadog.trace.api.internal.VisibleForTesting;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
Expand Down Expand Up @@ -187,7 +188,7 @@ private static String nextMediaRange(String s, int[] pos, float[] quality) {
return mediaRangeMatcher.group(1);
}

// public for testing
@VisibleForTesting
public static void reset(Config config) {
TEMPLATE_HTML = null;
TEMPLATE_JSON = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import datadog.trace.api.BaseHash;
import datadog.trace.api.Config;
import datadog.trace.api.internal.VisibleForTesting;
import datadog.trace.bootstrap.instrumentation.api.AgentSpan;
import datadog.trace.bootstrap.instrumentation.api.Tags;
import java.io.UnsupportedEncodingException;
Expand Down Expand Up @@ -88,7 +89,7 @@ private static void ensureStaticPrefixComputed() {
staticPrefixComputed = true;
}

// @VisibleForTesting
@VisibleForTesting
public static void resetStaticPrefixForTesting() {
staticPrefixComputed = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import datadog.trace.api.Config;
import datadog.trace.api.ProcessTags;
import datadog.trace.api.WellKnownTags;
import datadog.trace.api.internal.VisibleForTesting;
import datadog.trace.util.PidHelper;
import datadog.trace.util.RandomUtils;
import java.io.BufferedReader;
Expand Down Expand Up @@ -137,7 +138,7 @@ public Builder extendedInfoEnabled(boolean extendedInfoEnabled) {
return this;
}

// @VisibleForTesting
@VisibleForTesting
Builder reportUUID(String reportUUID) {
this.reportUUID = reportUUID;
return this;
Expand Down Expand Up @@ -170,7 +171,7 @@ private static String getBaseName(File file) {
return filename.substring(0, dotIndex);
}

// @VisibleForTesting
@VisibleForTesting
static String getMergedTagsForSerialization(Config config) {
return config.getMergedCrashTrackingTags().entrySet().stream()
.filter(e -> e.getValue() != null)
Expand All @@ -195,7 +196,7 @@ public static void writeConfigToPath(File scriptFile, String... additionalEntrie
writeConfigToFile(Config.get(), cfgFile, additionalEntries);
}

// @VisibleForTesting
@VisibleForTesting
static void writeConfigToFile(Config config, File cfgFile, String... additionalEntries) {
final WellKnownTags wellKnownTags = config.getWellKnownTags();

Expand Down
Loading