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.

Should RateLimitingSampler be public?

See original GitHub issue

I am trying to replicate* changes from SamplerAutoConfiguration autoconfiguration logic into spring-cloud-gcp, but RateLimitingSampler is package-private. Was it meant to be only package private, or is it okay to relax its visibility to public? ProbabilityBasedSampler, which is in the same package and is used similarly, is public already.

* I’d rather not replicate them at all and just rely on SamplerAutoConfiguration, but whenever TraceAutoConfiguration and SamplerAutoConfiguration are both present, TraceAutoConfiguration’s NEVER_SAMPLE sampler gets instantiated due to Spring Boot ordering (TraceAutoConfiguration has an order and SamplerAutoConfiguration does not, so SamplerAutoConfiguration is processed at the end). From the docs, NEVER_SAMPLE seems like intended behavior.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
elefeintcommented, Jul 26, 2019

No added benefit whatsoever! @AutoConfigureBefore(TraceAutoConfiguration.class) in SamplerAutoConfiguration will be the perfect solution to our problem; then I can remove the custom sampler beans from StackdriverTraceAutoConfiguration for good.

0reactions
marcingrzejszczakcommented, Jul 29, 2019

There’s no such property to disable a sampler. It doesn’t make much sense to have one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RateLimitingSampler (jaeger-core 0.31.0 API) - Javadoc.io
Class RateLimitingSampler. java.lang. ... public class RateLimitingSampler extends java.lang. ... Returns: whether or not the new trace should be sampled ...
Read more >
Sampler (Brave 5.12.3 API) - Zipkin
public abstract class Sampler extends Object. Sampler is responsible for deciding if a particular trace should be "sampled", i.e. whether the overhead of ......
Read more >
opentracing/public - Gitter
opentracing/public ... In Jaeger the basic rate limiting sampler is local to the tracer ... What should i do to see current trace...
Read more >
Spring Cloud Sleuth Reference Documentation
You can check https://spring.io/projects/spring-cloud for more ... @RestController @EnableAutoConfiguration public class Example { private static final ...
Read more >
What is Jaeger? - Medium
To configure the Jaeger we need to add dependency of Jaeger Client in ... public JaegerTracer jaegerTracer() { return new io.jaegertracing.
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