File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
dd-java-agent/agent-debugger/src/main/java/com/datadog/debugger/probe Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -553,9 +553,6 @@ public void commit(CapturedContext lineContext, int line) {
553553 if (status .shouldSend ()) {
554554 snapshot .setTraceId (lineContext .getTraceId ());
555555 snapshot .setSpanId (lineContext .getSpanId ());
556- if (isCaptureSnapshot ()) {
557- snapshot .addLine (lineContext , line );
558- }
559556 snapshot .setMessage (status .getMessage ());
560557 shouldCommit = true ;
561558 }
@@ -564,9 +561,12 @@ public void commit(CapturedContext lineContext, int line) {
564561 shouldCommit = true ;
565562 }
566563 if (shouldCommit ) {
567- // freeze context just before commit because line probes have only one context
568- Duration timeout = Duration .of (Config .get ().getDebuggerCaptureTimeout (), ChronoUnit .MILLIS );
569- lineContext .freeze (new TimeoutChecker (timeout ));
564+ if (isCaptureSnapshot ()) {
565+ // freeze context just before commit because line probes have only one context
566+ Duration timeout = Duration .of (Config .get ().getDebuggerCaptureTimeout (), ChronoUnit .MILLIS );
567+ lineContext .freeze (new TimeoutChecker (timeout ));
568+ snapshot .addLine (lineContext , line );
569+ }
570570 commitSnapshot (snapshot , sink );
571571 return ;
572572 }
You can’t perform that action at this time.
0 commit comments