Skip to content
Merged
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -553,9 +553,6 @@ public void commit(CapturedContext lineContext, int line) {
if (status.shouldSend()) {
snapshot.setTraceId(lineContext.getTraceId());
snapshot.setSpanId(lineContext.getSpanId());
if (isCaptureSnapshot()) {
snapshot.addLine(lineContext, line);
}
snapshot.setMessage(status.getMessage());
shouldCommit = true;
}
Expand All @@ -564,9 +561,12 @@ public void commit(CapturedContext lineContext, int line) {
shouldCommit = true;
}
if (shouldCommit) {
// freeze context just before commit because line probes have only one context
Duration timeout = Duration.of(Config.get().getDebuggerCaptureTimeout(), ChronoUnit.MILLIS);
lineContext.freeze(new TimeoutChecker(timeout));
if (isCaptureSnapshot()) {
// freeze context just before commit because line probes have only one context
Duration timeout = Duration.of(Config.get().getDebuggerCaptureTimeout(), ChronoUnit.MILLIS);
lineContext.freeze(new TimeoutChecker(timeout));
snapshot.addLine(lineContext, line);
}
commitSnapshot(snapshot, sink);
return;
}
Expand Down