Skip to content
Open
Show file tree
Hide file tree
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 @@ -458,7 +458,7 @@ public void initSamplers() {
double rate =
sampling != null
? sampling.getEventsPerSecond()
: (isCaptureSnapshot()
: (isFullSnapshot()
? ProbeRateLimiter.DEFAULT_SNAPSHOT_RATE
: ProbeRateLimiter.DEFAULT_LOG_RATE);
sampler = ProbeRateLimiter.createSampler(rate);
Expand Down Expand Up @@ -502,7 +502,7 @@ public InstrumentationResult.Status instrument(
public boolean isReadyToCapture() {
if (!hasCondition()) {
// we are sampling here to avoid creating CapturedContext when the sampling result is negative
return ProbeRateLimiter.tryProbe(sampler, isCaptureSnapshot());
return ProbeRateLimiter.tryProbe(sampler, isFullSnapshot());
}
return true;
}
Expand Down Expand Up @@ -570,10 +570,10 @@ private void sample(LogStatus logStatus, MethodLocation methodLocation) {
// if condition has error and no capture Snapshot, the error is reported using errorSampler
// at 1/s rate instead of the log template one
Sampler localSampler =
logStatus.hasConditionErrors && !isCaptureSnapshot() ? errorSampler : sampler;
logStatus.hasConditionErrors && !isFullSnapshot() ? errorSampler : sampler;
boolean sampled =
!logStatus.getDebugSessionStatus().isDisabled()
&& ProbeRateLimiter.tryProbe(localSampler, isCaptureSnapshot());
&& ProbeRateLimiter.tryProbe(localSampler, isFullSnapshot());
logStatus.setSampled(sampled);
if (!sampled) {
DebuggerAgent.getSink()
Expand Down
Loading
Loading