-
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 2 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 |
|---|---|---|
|
|
@@ -80,6 +80,22 @@ 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 integer number between 0 and | ||
|
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 convention we have for headers in docs is
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. |
||
| // 100. | ||
| uint32 client_enabled = 3 [(validate.rules).uint32.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. You will need to use wrapped types, i.e.
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. Ok, so just so we're all clear, you're saying they need to be nullable so that we can detect when they're not set when we plumb it through to the runtime? (EDIT: I now see that they're not nullable, but they're null-check-able. Heh.) Makes sense. Fixed.
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. Yep. |
||
|
|
||
| // Global target percentage of requests that will be traced after all other | ||
| // checks have been applied (force tracing, sampling, etc.). Must be a | ||
| // number between 0 and | ||
| // 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. Please specify the default as done in https://www.envoyproxy.io/docs/envoy/latest/configuration/http_conn_man/runtime.html?highlight=sample.
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. |
||
| uint32 global_enabled = 4 [(validate.rules).uint32.lte = 100]; | ||
|
|
||
| // Global target percentage of requests that will be randomly traced. | ||
| // Specified as ten-thousandths of a percent (i.e., in 0.01% increments), | ||
| // using integer numbers in the range 0-10000. | ||
|
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. This is a problem in runtime as well, but I can't help but feel that we should have a standard practice for specifying percentages in the Envoy proto API. In some places, we use @mattklein123 @wora for comment and possible addition to STYLE.md. I don't think there is anything actionable for this PR @hausdorff.
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. +1. I'm sad we didn't do this in the original v2 conversion. Oh well. Might as well start now. Can we just add a common Percent message per @htuch? I would probably just use a double and clamp it between 0.0 and 1.0. Internally, we can convert to integer as needed (e.g., a number out of 10,000 or 100,000 or whatever).
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. I didn't want to cause waves by having the API not match up with the implementation, but I'd also prefer the wrapping a Fixed. |
||
| uint32 random_sampling = 5 [(validate.rules).uint32.lte = 10000]; | ||
| } | ||
|
|
||
| // 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.
Consider linking back and forth between these docs and https://www.envoyproxy.io/docs/envoy/latest/configuration/http_conn_man/runtime.html?highlight=sample.
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.
Originally I didn't because this link went stale in the original issue, but we can add it if you like.