Why is @Bean SamplerFunction<MessagingRequest> trySample never executed?
See original GitHub issueIn project with spring-cloud-stream, rabbitmq and spring-cloud-sleuth my SamplerFunction<MessagingRequest>.trySample is never executed. Where can be a problem? Bean is in a correct @Configuration class (other beans are created and work).
`spring.sleuth.sampler.probability: 0.001
@Bean
SamplerFunction<MessagingRequest> zipkinSampler() {
return new Zipkin.ZipkinSampler();
}
public static class ZipkinSampler implements SamplerFunction<MessagingRequest> {
private SamplerFunction<MessagingRequest> sampler = MessagingRuleSampler.newBuilder()
.putRule(channelNameEquals("alertsNever"), Sampler.NEVER_SAMPLE)
.putRule(channelNameEquals("rabbitChannel"), RateLimitingSampler.create(1))
.putRule(Matchers.alwaysMatch(), RateLimitingSampler.create(100))
.build();;
@Override
public Boolean trySample(final MessagingRequest request) {
log.info("trySample {}, channelKind: {}, channelName: {}, operation: {}", request, request.channelKind(), request.channelName(), request.operation());
return sampler.trySample(request);
}
}`
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Component Reference - Apache JMeter - User's Manual
The JavaTest example sampler can be useful for checking test plans, because it allows one to set values in almost all the fields....
Read more >Spring ResponseStatusException does not return reason
I'm passing a JSON, but I'm not validating anything, I'm just trying to set the custom message. If I change the status code,...
Read more >Spring Bean Life Cycle | DigitalOcean
Today we will look into Spring Bean Life Cycle. Spring Beans are the most important part of any Spring application.
Read more >5. The IoC container - Spring
In Spring, the objects that form the backbone of your application and that are managed by the Spring IoC container are called beans....
Read more >How to Write Groovy JMeter Functions - BlazeMeter
This means that JMeter will execute the Groovy script faster, resulting in a ... Because each Beanshell sampler has its own copy of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Here is a sample repository to reproduce the issue https://github.com/gindex/sleuth-rabbit-issue
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.