Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
2c219fd
add `di_enabled` to settings response
daniel-mohedano Jul 4, 2025
a911ae0
add FTR related metrics
daniel-mohedano Jul 4, 2025
d20159e
add FTR to execution settings
daniel-mohedano Jul 4, 2025
c4c84d6
add basic exception replay integration in agent mode
daniel-mohedano Jul 14, 2025
ae31670
feat: headless and agentless changes
daniel-mohedano Jul 22, 2025
4f2d6a9
Merge branch 'master' into daniel.mohedano/failed-test-replay
daniel-mohedano Jul 22, 2025
c7eeac8
fix: tests
daniel-mohedano Jul 23, 2025
14cf11c
fix: testng capabilities
daniel-mohedano Aug 4, 2025
461fb1f
feat: refactor agentless intakes
daniel-mohedano Aug 6, 2025
14b1054
Merge branch 'master' into daniel.mohedano/failed-test-replay
daniel-mohedano Aug 6, 2025
a87eff0
chore: update smoke test fixtures
daniel-mohedano Aug 6, 2025
19b4edf
test: add unit test for new Intake enum
daniel-mohedano Aug 6, 2025
9e81cc7
test: remove ftr from instrumentation tests (not used)
daniel-mohedano Aug 6, 2025
4e3deb4
test: introduce FTR smoke tests for headfull and headless modes
daniel-mohedano Aug 11, 2025
f931654
style: spotless and codenarc
daniel-mohedano Aug 11, 2025
eacde60
feat: add test event finished FTR telemetry
daniel-mohedano Aug 11, 2025
0228f71
feat: add `product` field to snapshots
daniel-mohedano Aug 11, 2025
88fd665
feat: implement SuiteEnd listener for sink flushing
daniel-mohedano Aug 11, 2025
ec9c54d
feat: introduce new config variables for debugger
daniel-mohedano Aug 12, 2025
d4d2432
chore: remove todo
daniel-mohedano Aug 19, 2025
ffda9b3
Merge branch 'master' into daniel.mohedano/failed-test-replay
daniel-mohedano Aug 19, 2025
49eaebf
feat: align FTR settings with JS' implementation
daniel-mohedano Aug 21, 2025
b4cef2c
feat: PR suggestions
daniel-mohedano Aug 22, 2025
d82a7fa
feat: implement debugger config bridge
daniel-mohedano Aug 27, 2025
ab8d8e9
fix: move check from policy to history for FTR
daniel-mohedano Aug 27, 2025
bd81769
fix: tests
daniel-mohedano Aug 27, 2025
c257390
chore: update codeowners
daniel-mohedano Aug 27, 2025
73bf81d
Merge branch 'master' into daniel.mohedano/failed-test-replay
daniel-mohedano Aug 27, 2025
3a89ca3
test: better unit tests
daniel-mohedano Sep 1, 2025
54dbb03
Merge branch 'master' into daniel.mohedano/failed-test-replay
daniel-mohedano Sep 1, 2025
a1f58f3
fix: add CI Intake back
daniel-mohedano Sep 1, 2025
719a934
style: spotless
daniel-mohedano Sep 1, 2025
b223a21
fix: tests
daniel-mohedano Sep 1, 2025
58a096b
fix: correct intake usage
daniel-mohedano Sep 1, 2025
920421a
fix: change info to debug log
daniel-mohedano Sep 3, 2025
2852d25
feat: move away from deferred queue in favor of merging updates
daniel-mohedano Sep 3, 2025
d80e531
fix: pr suggestions
daniel-mohedano Sep 4, 2025
34cf624
feat: refactor FTR logic into it's own exceptiondebugger implementation
daniel-mohedano Sep 4, 2025
887350f
fix: jacoco coverage
daniel-mohedano Sep 4, 2025
f1f1264
fix: remove snapshot product and async instrumentation config
daniel-mohedano Sep 8, 2025
8e145f4
fix: remove sync config test
daniel-mohedano Sep 8, 2025
bb06f75
Merge branch 'master' into daniel.mohedano/failed-test-replay
daniel-mohedano Sep 8, 2025
098b929
fix: add history on test start
daniel-mohedano Sep 8, 2025
a56d10f
fix: use synchronized instead of atomic refs in bridge
daniel-mohedano Sep 8, 2025
f32dcef
fix: abstract repeated smoke test logic
daniel-mohedano Sep 8, 2025
ea090f9
fix: synchronization on bridge
daniel-mohedano Sep 9, 2025
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
Prev Previous commit
Next Next commit
fix: remove snapshot product and async instrumentation config
  • Loading branch information
daniel-mohedano committed Sep 8, 2025
commit f1f12645f0cbe92fbb1900a461142736e5d339e3
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ abstract class CiVisibilitySmokeTest extends Specification {
def requiredSnapshotFields = ["captures", "exceptionId", "probe", "stack"]

logs.each { log ->
assert log.product == "test_optimization"
requiredLogFields.each { field -> log.containsKey(field) }

Map<String, Object> debuggerMap = log.debugger as Map<String, Object>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@
public class JsonSnapshotSerializer implements DebuggerContext.ValueSerializer {
private static final String DD_TRACE_ID = "dd.trace_id";
private static final String DD_SPAN_ID = "dd.span_id";
public static final String TEST_OPT_PRODUCT = "test_optimization";
private static final JsonAdapter<IntakeRequest> ADAPTER =
MoshiHelper.createMoshiSnapshot().adapter(IntakeRequest.class);
private static final JsonAdapter<CapturedContext.CapturedValue> VALUE_ADAPTER =
new MoshiSnapshotHelper.CapturedValueAdapter();

public String serializeSnapshot(String serviceName, Snapshot snapshot, Config config) {
IntakeRequest request =
new IntakeRequest(serviceName, new DebuggerIntakeRequestData(snapshot), config);
public String serializeSnapshot(String serviceName, Snapshot snapshot) {
IntakeRequest request = new IntakeRequest(serviceName, new DebuggerIntakeRequestData(snapshot));
handleCorrelationFields(snapshot, request);
handleDuration(snapshot, request);
handlerLogger(snapshot, request);
Expand Down Expand Up @@ -55,7 +53,6 @@ public static class IntakeRequest {
private final String service;
private final DebuggerIntakeRequestData debugger;
private final String ddsource = "dd_debugger";
private final String product;
private final String message;

private final String ddtags;
Expand Down Expand Up @@ -88,15 +85,14 @@ public static class IntakeRequest {
@Json(name = "logger.thread_name")
private String loggerThreadName;

public IntakeRequest(String service, DebuggerIntakeRequestData debugger, Config config) {
public IntakeRequest(String service, DebuggerIntakeRequestData debugger) {
this.service = service;
this.debugger = debugger;
this.message = debugger.snapshot.getMessage();
this.ddtags = debugger.snapshot.getProbe().getStrTags();
this.timestamp = debugger.snapshot.getTimestamp();
final CharSequence pt = ProcessTags.getTagsForSerialization();
this.processTags = pt != null ? pt.toString() : null;
this.product = config.isCiVisibilityEnabled() ? TEST_OPT_PRODUCT : null;
}

public String getService() {
Expand All @@ -111,10 +107,6 @@ public String getDdsource() {
return ddsource;
}

public String getProduct() {
return product;
}

public String getMessage() {
return message;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public DefaultExceptionDebugger(
classNameFiltering,
config.getDebuggerMaxExceptionPerSecond(),
config.getDebuggerExceptionMaxCapturedFrames(),
config.isDebuggerExceptionAsyncConfig());
true);
}

DefaultExceptionDebugger(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,10 @@ public class SnapshotSink {
private final AtomicBoolean started = new AtomicBoolean();
private volatile AgentTaskScheduler.Scheduled<SnapshotSink> highRateScheduled;
private volatile long currentHighRateFlushInterval = HIGH_RATE_MAX_FLUSH_INTERVAL_MS;
private final Config config;

public SnapshotSink(Config config, String tags, BatchUploader snapshotUploader) {
this.serviceName = TagsHelper.sanitize(config.getServiceName());
this.batchSize = config.getDynamicInstrumentationUploadBatchSize();
this.config = config;
this.tags = tags;
this.snapshotUploader = snapshotUploader;
}
Expand Down Expand Up @@ -185,8 +183,7 @@ private List<String> getSerializedSnapshots(BlockingQueue<Snapshot> queue, int l

private String serializeSnapshot(String serviceName, Snapshot snapshot) {
snapshot.getId(); // Ensure id is generated
String str =
DebuggerAgent.getSnapshotSerializer().serializeSnapshot(serviceName, snapshot, config);
String str = DebuggerAgent.getSnapshotSerializer().serializeSnapshot(serviceName, snapshot);
String prunedStr = SnapshotPruner.prune(str, MAX_SNAPSHOT_SIZE, 4);
if (prunedStr.length() != str.length()) {
LOGGER.debug(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,22 +124,6 @@ public void addSnapshot(boolean processTagsEnabled) throws IOException {
}
}

@Test
public void addFailedTestReplaySnapshot() throws IOException {
when(config.isCiVisibilityEnabled()).thenReturn(true);
ProcessTags.reset(config);
DebuggerSink sink = createDefaultDebuggerSink();
DebuggerAgentHelper.injectSerializer(new JsonSnapshotSerializer());
Snapshot snapshot = createSnapshot();
sink.addSnapshot(snapshot);
sink.lowRateFlush(sink);
verify(batchUploader).upload(payloadCaptor.capture(), matches(EXPECTED_SNAPSHOT_TAGS));
String strPayload = new String(payloadCaptor.getValue(), StandardCharsets.UTF_8);
System.out.println(strPayload);
JsonSnapshotSerializer.IntakeRequest intakeRequest = assertOneIntakeRequest(strPayload);
assertEquals(JsonSnapshotSerializer.TEST_OPT_PRODUCT, intakeRequest.getProduct());
}

@Test
public void addMultipleSnapshots() throws IOException {
when(config.getDynamicInstrumentationUploadBatchSize()).thenReturn(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ public final class ConfigDefaults {
static final boolean DEFAULT_DEBUGGER_EXCEPTION_CAPTURE_INTERMEDIATE_SPANS_ENABLED = true;
static final int DEFAULT_DEBUGGER_EXCEPTION_MAX_CAPTURED_FRAMES = 3;
static final int DEFAULT_DEBUGGER_EXCEPTION_CAPTURE_INTERVAL_SECONDS = 60 * 60;
static final boolean DEFAULT_DEBUGGER_EXCEPTION_ASYNC_CONFIG = true;
static final boolean DEFAULT_DISTRIBUTED_DEBUGGER_ENABLED = false;
static final boolean DEFAULT_DEBUGGER_SOURCE_FILE_TRACKING_ENABLED = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ public final class DebuggerConfig {
"exception.replay.capture.max.frames";
public static final String DEBUGGER_EXCEPTION_CAPTURE_INTERVAL_SECONDS =
"exception.replay.capture.interval.seconds";
public static final String DEBUGGER_EXCEPTION_ASYNC_CONFIG =
"internal.exception.replay.async.config";
public static final String DEBUGGER_EXCEPTION_CAPTURE_INTERMEDIATE_SPANS_ENABLED =
"exception.replay.capture.intermediate.spans.enabled";
public static final String DISTRIBUTED_DEBUGGER_ENABLED = "distributed.debugger.enabled";
Expand Down
10 changes: 0 additions & 10 deletions internal-api/src/main/java/datadog/trace/api/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
import static datadog.trace.api.ConfigDefaults.DEFAULT_DB_CLIENT_HOST_SPLIT_BY_INSTANCE_TYPE_SUFFIX;
import static datadog.trace.api.ConfigDefaults.DEFAULT_DB_DBM_PROPAGATION_MODE_MODE;
import static datadog.trace.api.ConfigDefaults.DEFAULT_DB_DBM_TRACE_PREPARED_STATEMENTS;
import static datadog.trace.api.ConfigDefaults.DEFAULT_DEBUGGER_EXCEPTION_ASYNC_CONFIG;
import static datadog.trace.api.ConfigDefaults.DEFAULT_DEBUGGER_EXCEPTION_CAPTURE_INTERMEDIATE_SPANS_ENABLED;
import static datadog.trace.api.ConfigDefaults.DEFAULT_DEBUGGER_EXCEPTION_CAPTURE_INTERVAL_SECONDS;
import static datadog.trace.api.ConfigDefaults.DEFAULT_DEBUGGER_EXCEPTION_ENABLED;
Expand Down Expand Up @@ -282,7 +281,6 @@
import static datadog.trace.api.config.CrashTrackingConfig.CRASH_TRACKING_TAGS;
import static datadog.trace.api.config.CwsConfig.CWS_ENABLED;
import static datadog.trace.api.config.CwsConfig.CWS_TLS_REFRESH;
import static datadog.trace.api.config.DebuggerConfig.DEBUGGER_EXCEPTION_ASYNC_CONFIG;
import static datadog.trace.api.config.DebuggerConfig.DEBUGGER_EXCEPTION_CAPTURE_INTERMEDIATE_SPANS_ENABLED;
import static datadog.trace.api.config.DebuggerConfig.DEBUGGER_EXCEPTION_CAPTURE_INTERVAL_SECONDS;
import static datadog.trace.api.config.DebuggerConfig.DEBUGGER_EXCEPTION_CAPTURE_MAX_FRAMES;
Expand Down Expand Up @@ -1083,7 +1081,6 @@ public static String getHostName() {
private final boolean debuggerExceptionCaptureIntermediateSpansEnabled;
private final int debuggerExceptionMaxCapturedFrames;
private final int debuggerExceptionCaptureInterval;
private final boolean debuggerExceptionAsyncConfig;
private final boolean debuggerCodeOriginEnabled;
private final int debuggerCodeOriginMaxUserFrames;
private final boolean distributedDebuggerEnabled;
Expand Down Expand Up @@ -2456,9 +2453,6 @@ PROFILING_DATADOG_PROFILER_ENABLED, isDatadogProfilerSafeInCurrentEnvironment())
configProvider.getInteger(
DEBUGGER_EXCEPTION_CAPTURE_INTERVAL_SECONDS,
DEFAULT_DEBUGGER_EXCEPTION_CAPTURE_INTERVAL_SECONDS);
debuggerExceptionAsyncConfig =
configProvider.getBoolean(
DEBUGGER_EXCEPTION_ASYNC_CONFIG, DEFAULT_DEBUGGER_EXCEPTION_ASYNC_CONFIG);
debuggerSourceFileTrackingEnabled =
configProvider.getBoolean(
DEBUGGER_SOURCE_FILE_TRACKING_ENABLED, DEFAULT_DEBUGGER_SOURCE_FILE_TRACKING_ENABLED);
Expand Down Expand Up @@ -4120,10 +4114,6 @@ public int getDebuggerExceptionCaptureInterval() {
return debuggerExceptionCaptureInterval;
}

public boolean isDebuggerExceptionAsyncConfig() {
return debuggerExceptionAsyncConfig;
}

public boolean isDebuggerCodeOriginEnabled() {
return debuggerCodeOriginEnabled;
}
Expand Down