Describe the bug
RateLimiingSampler and TraceIdRationBasedSampler use String.format("RateLimitingSampler{%.2f}", maxTracesPerSecond) for building a description. Formatting of numbers in such way may result in 999.00 for en_US locale and 999,00 for pl_PL.
I propose to enforce locale for those two samplers, using String.format(Locale.ENGLISH, "RateLimitingSampler{%.2f}", maxTracesPerSecond).
If that solution is acceptable, I can take care of it.
Steps to reproduce
Change locale on your JVM to pl_PL and run JaegerRemoteSamplerTest test suite. Most tests will fail on checking of description formats.
What did you expect to see?
Behavior independent of locale.
What did you see instead?
Expecting actual:
"JaegerRemoteSampler{ParentBased{root:RateLimitingSampler{999,00},remoteParentSampled:AlwaysOnSampler,remoteParentNotSampled:AlwaysOffSampler,localParentSampled:AlwaysOnSampler,localParentNotSampled:AlwaysOffSampler}}"
to contain:
"RateLimitingSampler{999.00}"
What version and what artifacts are you using?
Artifacts: opentelemetry-java, jaeger-remote-sampler
Version: fdfacb0bdea770f354e27305b5aab77a9d965a4f
Environment
Compiler: OpenJDK 18.0.1
OS: MacOS
Describe the bug
RateLimiingSamplerandTraceIdRationBasedSampleruseString.format("RateLimitingSampler{%.2f}", maxTracesPerSecond)for building a description. Formatting of numbers in such way may result in999.00foren_USlocale and999,00forpl_PL.I propose to enforce locale for those two samplers, using
String.format(Locale.ENGLISH, "RateLimitingSampler{%.2f}", maxTracesPerSecond).If that solution is acceptable, I can take care of it.
Steps to reproduce
Change locale on your JVM to pl_PL and run
JaegerRemoteSamplerTesttest suite. Most tests will fail on checking of description formats.What did you expect to see?
Behavior independent of locale.
What did you see instead?
What version and what artifacts are you using?
Artifacts: opentelemetry-java, jaeger-remote-sampler
Version:
fdfacb0bdea770f354e27305b5aab77a9d965a4fEnvironment
Compiler: OpenJDK 18.0.1
OS: MacOS