Merge branch 'master' into 2.0.x
This commit is contained in:
@@ -16,4 +16,4 @@ chmod +x runAcceptanceTests.sh
|
||||
echo "Killing all running apps"
|
||||
./runAcceptanceTests.sh -t "${AT_WHAT_TO_TEST}" -n
|
||||
|
||||
./runAcceptanceTests.sh --kafka --whattotest "${AT_WHAT_TO_TEST}" --killattheend -cli "1.3.0.BUILD-SNAPSHOT"
|
||||
./runAcceptanceTests.sh --kafka --whattotest "${AT_WHAT_TO_TEST}" --killattheend -cli "1.3.3.BUILD-SNAPSHOT"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package org.springframework.cloud.sleuth.sampler;
|
||||
|
||||
import org.springframework.cloud.sleuth.Sampler;
|
||||
import org.springframework.cloud.sleuth.Span;
|
||||
|
||||
import java.util.BitSet;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import org.springframework.cloud.sleuth.Sampler;
|
||||
import org.springframework.cloud.sleuth.Span;
|
||||
|
||||
/**
|
||||
* This sampler is appropriate for low-traffic instrumentation (ex servers that each receive <100K
|
||||
* requests), or those who do not provision random trace ids. It not appropriate for collectors as
|
||||
@@ -39,7 +39,7 @@ public class PercentageBasedSampler implements Sampler {
|
||||
public boolean isSampled(Span currentSpan) {
|
||||
if (this.configuration.getPercentage() == 0 || currentSpan == null) {
|
||||
return false;
|
||||
} else if (this.configuration.getPercentage() == 100) {
|
||||
} else if (this.configuration.getPercentage() == 1.0f) {
|
||||
return true;
|
||||
}
|
||||
synchronized (this) {
|
||||
|
||||
Reference in New Issue
Block a user