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

Use String strategyType instead of int #172

Merged
merged 1 commit into from
May 8, 2018
Merged

Use String strategyType instead of int #172

merged 1 commit into from
May 8, 2018

Conversation

black-adder
Copy link
Contributor

Resolves #171

Unfortunately, when we swapped over to using string type for thrift instead of int for the python client, I forgot to swap over for the vanilla samplers.

I'm pretty sure our python clients are internally hooked up to emit logs on failure so I'm not sure why this wasn't reported by anyone. We should create some integration tests that handles this.

Signed-off-by: Won Jun Jang wjang@uber.com

Signed-off-by: Won Jun Jang <wjang@uber.com>
@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 95.354% when pulling 2d60e2d on fix_171 into 071c3a8 on master.

@@ -449,10 +448,10 @@ def _update_adaptive_sampler(self, per_operation_strategies):

def _update_rate_limiting_or_probabilistic_sampler(self, response):
s_type = response.get(STRATEGY_TYPE_STR)
if s_type == SamplingManager.SamplingStrategyType.PROBABILISTIC:
if s_type == PROBABILISTIC_SAMPLING_STRATEGY:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could also do || s_type == SamplingManager.SamplingStrategyType.PROBABILISTIC

@yurishkuro
Copy link
Member

Could you describe how you tested this? I was under impression that the test_driver had a test for ensuring the clients read the appropriate sampling policy (but maybe it's only in the internal adaptive sampling version).

@yurishkuro
Copy link
Member

Ticket for integration tests: jaegertracing/jaeger#804

@black-adder
Copy link
Contributor Author

Started all in one which I configured with static sampling strategies. Observed it failing and then with the change, it successfully used the new strategies.

@black-adder black-adder merged commit 688c471 into master May 8, 2018
@black-adder black-adder deleted the fix_171 branch May 8, 2018 20:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants