-
Notifications
You must be signed in to change notification settings - Fork 62
fix random sample fraction percent #102
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -266,8 +266,9 @@ HttpConnectionManagerConfig::HttpConnectionManagerConfig( | |
| envoy::type::FractionalPercent random_sampling; | ||
| // TODO: Random sampling historically was an integer and default to out of 10,000. We should | ||
| // deprecate that and move to a straight fractional percent config. | ||
| random_sampling.set_numerator( | ||
| tracing_config.has_random_sampling() ? tracing_config.random_sampling().value() : 10000); | ||
| uint64_t random_sampling_numerator{PROTOBUF_PERCENT_TO_ROUNDED_INTEGER_OR_DEFAULT( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just for my sanity...
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, see the test that I added. |
||
| tracing_config, random_sampling, 10000, 10000)}; | ||
| random_sampling.set_numerator(random_sampling_numerator); | ||
| random_sampling.set_denominator(envoy::type::FractionalPercent::TEN_THOUSAND); | ||
| envoy::type::FractionalPercent overall_sampling; | ||
| overall_sampling.set_numerator( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the TODO comment still relevant?