question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Spans not exported to Zipkin with property 'spring.sleuth.sampler.probability' set to value 1

See original GitHub issue

I’m developing application using Spring Boot (2.1.4) running on Kubernetes. Spans from my application aren’t exported to Zipkin while property ‘spring.sleuth.sampler.probability’ is set to value 1.

[2019-05-17T09:59:07.083Z][http-nio-8080-exec-9] TRACE; [service,71283846f6dd8fc3c096c1eae7e35142,8b3124a796b24061,false] ; org.springframework.cloud.sleuth.log.Slf4jScopeDecorator; Starting scope for span: 71283846f6dd8fc3c096c1eae7e35142/8b3124a796b24061
[2019-05-17T09:59:07.083Z][http-nio-8080-exec-9] TRACE; [service,71283846f6dd8fc3c096c1eae7e35142,8b3124a796b24061,false] ; org.springframework.cloud.sleuth.log.Slf4jScopeDecorator; With parent: -4569251557263847102
[2019-05-17T09:59:07.109Z][http-nio-8080-exec-9] TRACE; [service,71283846f6dd8fc3c096c1eae7e35142,8b3124a796b24061,false] ; org.springframework.cloud.sleuth.log.Slf4jScopeDecorator; Closing scope for span: 71283846f6dd8fc3c096c1eae7e35142/8b3124a796b24061

I set this property via Consul and verified via Actuator (endpoint actuator/configprops) that it is set properly:

                "spring.sleuth.sampler-org.springframework.cloud.sleuth.sampler.SamplerProperties": {
                    "prefix": "spring.sleuth.sampler",
                    "properties": {
                        "probability": 1
                    }
                },

Is there any additional property/header/configuration that could prevent sending spans by Sleuth to Zipkin?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
devinsbacommented, May 17, 2019

You need to set the sampling in istio, it is likely marking the traces as not sampled through the headers it generated

0reactions
pawcykcacommented, May 17, 2019

You are right! Default value of PILOT_TRACE_SAMPLING environment variable was set to 1.0 (what means 1%)

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

4. Sampling - Spring Cloud
The ProbabilityBasedSampler is the default if you use spring-cloud-sleuth-zipkin . You can configure the exports by setting spring.sleuth.sampler.probability .
Read more >
Sleuth-Zipkin export flag is not coming as 'true' always
I am trying to use sleuth and Zipkin in a demo spring boot application. I have added the required dependency in pom.xml and...
Read more >
spring-cloud-sleuth - Gitee
If you use Zipkin, configure the probability of spans exported by setting spring.sleuth.sampler.probability (default: 0.1, which is 10 percent).
Read more >
spring-cloud/spring-cloud-sleuth - Gitter
Unfortunately no spans appear on Zipkin: Anything obvious missing or wrong from ... false sleuth: sampler: probability: 1 opentracing: enabled: true zipkin: ...
Read more >
Tracing a Reactive Kotlin App with Spring Cloud Sleuth
Distributed tracing with Spring Cloud Sleuth for reactive microservices. Part 1. ... A Trace is a set of spans forming a tree-like structure....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found