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

In Jaeger Config, enable to add directly a sampler #324

Merged
merged 4 commits into from
Sep 3, 2021
Merged

In Jaeger Config, enable to add directly a sampler #324

merged 4 commits into from
Sep 3, 2021

Conversation

Etienne-Carriere
Copy link
Contributor

It can be useful when using a specific sampler that is not included in
this library (for example private sampler)

Which problem is this PR solving?

#323

Short description of the changes

Accept on Jaeger Config parameter sampler not only a dict but also a Sampler object

Etienne CARRIERE added 3 commits September 3, 2021 12:31
It can be useful when using a specific sampler that is not included in
this library

Signed-off-by: Etienne CARRIERE <[email protected]>
Signed-off-by: Etienne CARRIERE <[email protected]>
Signed-off-by: Etienne CARRIERE <[email protected]>
@codecov
Copy link

codecov bot commented Sep 3, 2021

Codecov Report

Merging #324 (a58551d) into master (948b37e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #324   +/-   ##
=======================================
  Coverage   95.43%   95.43%           
=======================================
  Files          25       25           
  Lines        1971     1973    +2     
  Branches      273      274    +1     
=======================================
+ Hits         1881     1883    +2     
  Misses         56       56           
  Partials       34       34           
Impacted Files Coverage Δ
jaeger_client/config.py 95.65% <100.00%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 948b37e...a58551d. Read the comment docs.

sampler_config = self.config.get('sampler', {})
sampler_type = sampler_config.get('type', None)
sampler_param = sampler_config.get('param', None)
sampler_param = self.config.get('sampler', {})
Copy link
Member

Choose a reason for hiding this comment

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

this is overloading sampler_param variable. I would keep it as sampler_config

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I choose to change from sampler_config to sampler_param as now it can be both a sampler or a config so I choose a more generic name but if you want I can come back to sampler_config

Copy link
Member

Choose a reason for hiding this comment

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

I'd be fine with sampler_config or sampler (prefer config as it's more common use case). But param is confusing since it's the inner field.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you are right . I come back to sampler_config .

Signed-off-by: Etienne Carriere <[email protected]>
@yurishkuro yurishkuro merged commit abf7a25 into jaegertracing:master Sep 3, 2021
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.

2 participants