-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All-in-one docker image: SAMPLING_STRATEGIES_FILE env var can't be used (without args overwrite) #3022
Comments
+1, would you like to submit a fix? |
Or you could mount your strategies file in the place that is spefied in the CMD?
Sounds good to me.
I think we don't actually need this setting/file in the container to begin with... Perhaps it should just be removed from the Docker image? |
+1 |
The file tells all SDKs connected to all-in-one to use 100% sampling. There's no other way afaik to configure this on the backend. I assume without this file the default would be something like 0.001 (we could introduce a param to control that value without a file) |
Is this also the default only for all-in-one? |
Or simply keep the file in the image but make its usage optional, i.e. do not use the |
It's the default for the SDKs using remote sampler. all-in-one itself is internally traced with 100% (can be overridden via env)
|
Sorry, I meant to ask whether remote samplers getting the strategy from an all-in-one would get the same strategy as from a jaeger-collector. Are they both serving the same strategies? If so, shouldn't we be changing the default to 1 instead? |
yes, it's the same remote sampling mechanism.
I think that would be a dangerous breaking change. |
So this means the strategies file is needed for now, and we can stick to defining the env var in the Dockerfile, instead of using the
I would gladly provide a PR but since getting company approval for contributing here would take a while and since it's such a small change, I would appreciate it if someone else could do it. |
jaegertracing/jaeger#3022 has been fixed in Jaeger All-in-One 1.23 Signed-off-by: Kai Hudalla <kai.hudalla@bosch.io>
jaegertracing/jaeger#3022 has been fixed in Jaeger All-in-One 1.23 Signed-off-by: Kai Hudalla <kai.hudalla@bosch.io>
jaegertracing/jaeger#3022 has been fixed in Jaeger All-in-One 1.23 Signed-off-by: Kai Hudalla <kai.hudalla@bosch.io>
Describe the bug
I'm using the all-in-one docker image in a Kubernetes deployment and want to set a sampling-strategies file.
The obvious thing (to me) seems to be setting the
SAMPLING_STRATEGIES_FILE
env var in the K8s deployment descriptor.But that doesn't work - still the default
/etc/jaeger/sampling_strategies.json
file gets used. And that is not even obvious as there isn't a log output giving info about which file is used (see #2197).Only a look at the all-in-one dockerfile
jaeger/cmd/all-in-one/Dockerfile
Line 67 in c991a00
reveals that the
sampling.strategies-file
param is set there - obviously having precedence.So, I would either need to set
args: [""]
(in the K8s deployment descriptionspec.template.spec.containers
section) in order to be able to use theSAMPLING_STRATEGIES_FILE
env var.Or, I would have to use
args: ["--sampling.strategies-file=/path/my_sampling_strategies.json"]
. But that means I have to check the all-in-one dockerfile to see what other parameters I'm possibly overwriting with this.Suggested fix
To me it seems that things would be easier, more intuitive and less error-prone if the all-in-one image docker file would set a
SAMPLING_STRATEGIES_FILE
env var with the default sampling-strategies file instead of using the parameter in theCMD
entry.Then a
SAMPLING_STRATEGIES_FILE
env var in the K8s deployment descriptor can override the default. Alternatively, usingargs: ["--sampling.strategies-file=/path/my_sampling_strategies.json"]
in the K8s deployment descriptor instead should still work, the command line parameter having precedence then.To Reproduce
Steps to reproduce the behavior:
SAMPLING_STRATEGIES_FILE
has had no effect.args: [""]
on the same level asenv
and update deployment to see pod startup failure - meaning this time the env var got actually used.Expected behavior
SAMPLING_STRATEGIES_FILE
env var can be used in the K8s deployment description without further required changes.Version (please complete the following information):
The text was updated successfully, but these errors were encountered: