Merge branch 'master' into 2.0.x

This commit is contained in:
Marcin Grzejszczak
2017-06-06 07:56:04 +02:00
2 changed files with 5 additions and 5 deletions

View File

@@ -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"

View File

@@ -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) {