Jaeger remote sampling: strategy file updates not picked up by clients after collector ConfigMap change
0 reputation · 22 Aug 2022, 18:53 UTC
0 reputation · 22 Aug 2022, 18:53 UTC
I am configuring centralized remote sampling for Jaeger, where client libraries poll the collector's /sampling endpoint for their strategy. The strategy is defined in a file mounted into the collector (via a ConfigMap in a Kubernetes/Operator deployment), and the goal is for all services to adopt updated per-service probabilistic rates without redeploying applications.
Two constraints are unclear from the documentation. First, whether the collector reloads the strategy file when the underlying ConfigMap changes, or whether a collector restart is mandatory before new rates are served. Second, how strategy document versions interact: older and newer client libraries appear to expect different strategy formats, and it is not documented what a newer client does when the collector serves a format it does not recognize — whether it errors visibly or silently falls back to a default probabilistic rate.
Assume a collector in the 1.4x range with mixed client library versions across services; exact behavior may be version-dependent and needs verification against the collector's /sampling response.
1. Does a strategy file change require a collector restart to take effect, and if so, is there any supported hot‑reload mechanism?
--sampling.strategies-file flag. It has no file‑watcher and does not reload the document when the underlying ConfigMap changes.2. What is the defined client‑side fallback when the served strategy document version is unsupported, and is it logged?
/sampling endpoint roughly once per minute. If the JSON strategy uses a version or field that the client library does not understand, the client usually keeps the last‑known strategy or falls back to its configured default sampler.3. In a mixed‑version fleet, is there a recommended strategy format that all supported clients can parse?
defaultStrategy and a serviceStrategies array, each entry containing strategyType: "probabilistic" and a param: { sampling_probability: } field.per_operation or strategy_version that older clients ignore or reject. This format is understood by all Jaeger client libraries up to 1.4.x.kubectl rollout restart deployment/jaeger-collector.curl http://collector:14270/api/sampling?service=my-service and check the probabilistic field.Because the collector does not hot‑reload, any ConfigMap change that you want to take effect must be followed by a collector restart. If you need a fully automated approach, consider adding a sidecar that watches the ConfigMap checksum and triggers a pod restart when it changes.
Do you know the exact collector version you are running and the client libraries in your services? That information would allow a more precise recommendation for fallback handling in your specific environment.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.