Skip to content

Should RateLimitingSampler be public? #1409

@elefeint

Description

@elefeint

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions