-
Notifications
You must be signed in to change notification settings - Fork 273
Expose trace sampling controls in the public API #375
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 3 commits
2c4373d
33e1cea
2ebd52a
5f4defe
6938a37
bec964a
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 |
|---|---|---|
|
|
@@ -227,3 +227,7 @@ message TransportSocket { | |
| // See the supported transport socket implementations for further documentation. | ||
| google.protobuf.Struct config = 2; | ||
| } | ||
|
|
||
| message Percent { | ||
| float value = 5 [(validate.rules).float = {gte: 0, lte: 100}]; | ||
|
Member
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.
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. ah, sorry, I got lazy. Will fix. |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -80,6 +80,26 @@ message HttpConnectionManager { | |
| // populate the tag name, and the header value is used to populate the tag value. The tag is | ||
| // created if the specified header name is present in the request's headers. | ||
| repeated string request_headers_for_tags = 2; | ||
|
|
||
| // Global target percentage of requests that will be force traced if the *x-client-trace-id* | ||
| // header is set. Must be an number between 0 and 100; resolution is to the nearest 1% (rounded | ||
| // down). Defaults to 100. This variable is a direct analog for the variable of the same name in | ||
| // the `HTTP Connection Manager | ||
| // <https://www.envoyproxy.io/docs/envoy/latest/configuration/http_conn_man/runtime.html?highlight=sample>`_. | ||
| Percent client_enabled = 3; | ||
|
Contributor
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. The field name is very vague. It is more like "client_enabled_sampling".
Member
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. Agreed. This was an unfortunate internal name choice. Let's fix this in the config. I would probably just do
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. Fixed. |
||
|
|
||
| // Global target percentage of requests that will be traced after all other checks have been | ||
|
Contributor
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. The concept of "after all other checks" is questionable here. In a distributed system, we can not assume there is a fixed order of checks. It doesn't seem proper to assume tracing has the privilege of being the last decider.
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. My understanding is that this is per-HTTP connection manager, which is not distributed, so I think we should just get rid of the "global" and call that out specifically. |
||
| // applied (force tracing, sampling, etc.). Must be a number between 0 and 100; resolution is to | ||
| // the nearest 1% (rounded down). Defaults to 100. This variable is a direct analog for the | ||
| // variable of the same name in the `HTTP Connection Manager | ||
| // <https://www.envoyproxy.io/docs/envoy/latest/configuration/http_conn_man/runtime.html?highlight=sample>`_. | ||
| Percent global_enabled = 4; | ||
|
Contributor
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. We should not design an API based on another API unless the concept is well know, such as country_code. From reading this comment, I don't understand what "global enabled" means to me, either as a developer or an operator.
Member
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. Yup let's clean this up. Let's just call this
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. Fixed. |
||
|
|
||
| // Global target percentage of requests that will be randomly traced. Must be a number between 0 | ||
|
Member
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. The range comments here can be elided if we add them to
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. Fixed. |
||
| // and 100; resolution is to the nearest 0.01%, rounded down. Defaults to 100. This variable is | ||
| // a direct analog for the variable of the same name in the `HTTP Connection Manager | ||
| // <https://www.envoyproxy.io/docs/envoy/latest/configuration/http_conn_man/runtime.html?highlight=sample>`_. | ||
|
Member
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. You can do
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. Fixed... I think |
||
| Percent random_sampling = 5; | ||
| } | ||
|
|
||
| // Presence of the object defines whether the connection manager | ||
|
|
||
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.
Can you add some simple comment for docs purposes (e.g. explaining purpose, valid ranges).
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.
Yep, fixed.