Skip to content

Commit

Permalink
Merge pull request #59 from chrisradek/fix-spurious-recorders
Browse files Browse the repository at this point in the history
fix(core): prevents CentralizedSamplingStrategy from instatiating extraneous recorders when no origin set
  • Loading branch information
chrisradek authored Feb 5, 2019
2 parents eed8aa9 + 2d06f8a commit f227f20
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ public SamplingResponse shouldTrace(SamplingRequest samplingRequest) {
logger.debug("Determining shouldTrace decision for:\n\tserviceName: " + samplingRequest.getService().orElse("") + "\n\thost: " + samplingRequest.getHost().orElse("") + "\n\tpath: " + samplingRequest.getUrl().orElse("") + "\n\tmethod: " + samplingRequest.getMethod().orElse("") + "\n\tserviceType: " + samplingRequest.getServiceType().orElse(""));
}

if (!samplingRequest.getServiceType().isPresent()) {
samplingRequest.setServiceType(AWSXRayRecorderBuilder.defaultRecorder().getOrigin());
}

if (manifest.isExpired(Instant.now())) {
logger.debug("Centralized sampling data expired. Using fallback sampling strategy.");
return fallback.shouldTrace(samplingRequest);
Expand Down

0 comments on commit f227f20

Please sign in to comment.