-
Notifications
You must be signed in to change notification settings - Fork 67
RemoteControlledSampler fails when Agent is on a different host from the application #163
Comments
Hi @hannahchan, thanks for your report. I'm sadly pretty occupied this and next week with another project. But I will try to fix it ASAP afterwards. Feel free to prepare a pull request for it if you have an assumption what's causing it. |
I just gave it a quick look because it sounded strange that it works with const sampler. What sampler do you intend to use? If you have not defined any sampler yourself, the default sampler is used. That's an remote controlled sampler whose endpoint you can configure using So if you intend to use a const, probabilistic or rate limited sampler, make sure to also set the correct parameters for Please see https://www.jaegertracing.io/docs/1.16/client-features/ & https://www.jaegertracing.io/docs/1.16/sampling/ & https://github.com/jaegertracing/jaeger-client-csharp/blob/master/src/Jaeger/Samplers/README.md for more information on samplers. Depending on your |
I can confirm that setting the environment variable I'm not too fussed this and there's no rush for me to get this fixed. In production we actually deploy the agent as a side car to our app in K8s with no environment variables set other than |
Hm, technically it's two different things at two different end points. But I assume you are right, that usually one would assume that just changing the agent would assume to also change the endpoint as it's mostly the same with just another port. I will look into it :) |
It is related to jaegertracing/jaeger#1971 (comment) The general consent is there to keep the variables decoupled, so it wouldn‘t be good to break that consent with this change. I will make another PR to resemble the consent here. But this means the default way is to specify the config endpoint in the separate variable as explained before. I will make sure to explain that more in the documentation to avoid confusion in the future. |
When the
JAEGER_AGENT_HOST
environment variable is set to a host other than the default localhost, the Jaeger.Samplers.RemoteControlledSampler fails with the following exception;I think it's trying to read the sampling configuration of the agent. When I change to the
const
sampler by setting the following environment variables, the agent starts receiving traces.This confirms that the network setup for the application and agent is correct and that the issue is in the RemoteControlledSampler class.
I tested this by writing a
docker-compose
file that spun up my application and the Jaeger agent as separate containers on the same virtual network.The text was updated successfully, but these errors were encountered: