Ensure clients set X-Not-Sampled header for non-exportable Span

It also turns out that there's a bug in Spring MVC which makes an
empty header blow up in RequestHeaderMapMethodArgumentResolver
so we set the header to "true" instead of empty.

Fixes gh-136
This commit is contained in:
Dave Syer
2016-01-30 16:19:15 +00:00
parent 4f3c731d37
commit 39998a5def
17 changed files with 254 additions and 80 deletions

View File

@@ -62,7 +62,7 @@ public class SleuthStreamAutoConfiguration {
@Override
public Message<?> preSend(Message<?> message, MessageChannel channel) {
return MessageBuilder.fromMessage(message)
.setHeader(Span.NOT_SAMPLED_NAME, "").build();
.setHeader(Span.NOT_SAMPLED_NAME, "true").build();
}
@Override