Add an option to use the X-B3-Flags header to override any sampling decision

without this change it's pretty much impossible to enforce sampling for certain traces
    with this change setting the X-B3-Flags to 1 for HTTP messages / spanFlags to 1 for messaging will override any sampling decisions

    fixes #496
This commit is contained in:
Marcin Grzejszczak
2017-01-18 13:12:13 +01:00
parent 9785bcae15
commit c347f724cd
12 changed files with 344 additions and 21 deletions

View File

@@ -49,6 +49,10 @@ A sampler can be installed just by creating a bean definition, e.g:
include::../../../../spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/documentation/SpringCloudSleuthDocTests.java[tags=always_sampler,indent=0]
----
TIP: You can set the HTTP header `X-B3-Flags` to `1` or when doing messaging you can
set `spanFlags` header to `1`. Then the current span will be forced to be exportable
regardless of the sampling decision.
== Instrumentation
Spring Cloud Sleuth instruments all your Spring application