Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Remote sampler always fails to refresh #171

Closed
nziebart opened this issue May 3, 2018 · 4 comments
Closed

Remote sampler always fails to refresh #171

nziebart opened this issue May 3, 2018 · 4 comments

Comments

@nziebart
Copy link
Contributor

nziebart commented May 3, 2018

Requirement - what kind of business use case are you trying to solve?

The remote sampler fails to refresh and always uses the default sampler

Problem - what in Jaeger blocks you from solving the requirement?

It looks like there are two sampling endpoints on jaeger-agent:
/sampling and /.
The former returns the strategy as a string (e.g. {"strategyType":"PROBABILISTIC"}), whereas the latter returns it as an integer (e.g. {"strategyType":0})

The python client appears to be expecting the integer version, but it is querying the /sampling endpoint. This causes the following error when refreshing the sampling strategy:

  File ".../jaeger_client/sampler.py", line 438, in _update_sampler
    self._update_rate_limiting_or_probabilistic_sampler(response)
  File ".../jaeger_client/sampler.py", line 470, in _update_rate_limiting_or_probabilistic_sampler
    raise ValueError('Unsupported sampling strategy type: %s' % s_type)
ValueError: Unsupported sampling strategy type: PROBABILISTIC

Proposal - what do you suggest to solve the problem or improve the existing situation?

We should use string constants for comparison here: https://github.com/jaegertracing/jaeger-client-python/blob/master/jaeger_client/sampler.py#L452

Any open questions to address

@nziebart nziebart changed the title Remote sampler is broken Remote sampler always fails to refresh May 3, 2018
@black-adder
Copy link
Contributor

Thanks for reporting, may I ask which version of jaeger-client and jaeger you are using?

@black-adder
Copy link
Contributor

Actually, nvm, i'll take a look. It's surprising we haven't had anyone internally report this issue yet. I swear I had a test for this...

@nziebart
Copy link
Contributor Author

nziebart commented May 3, 2018

This is jaeger-agent 1.3.0 and the 3.9.0 python client

@nziebart
Copy link
Contributor Author

nziebart commented May 3, 2018

It doesn't cause any runtime failures, so if the default rate of 0.001 is reasonable it might go unnoticed. Though there is a metric in the python client that counts the number of failed refreshes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants