-
Notifications
You must be signed in to change notification settings - Fork 47
Add schema for rule based sampler #410
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 9 commits
4764b55
397d5c4
d5d1a00
357a871
5d823c0
88ae928
1369994
b94c3fd
b12aa1c
2d7e634
7bf0452
6da72e1
30be8a7
add58ab
ce8dbc9
27e8eee
7f21223
8769d79
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 |
|---|---|---|
|
|
@@ -289,8 +289,45 @@ tracer_provider: | |
| ratio: 0.01 | ||
| local_parent_sampled: | ||
| composite/development: | ||
| probability: | ||
| ratio: 0.001 | ||
| # Configure sampler to be rule_based. | ||
| rule_based: | ||
| # The rules for the sampler, matched in order. Each rule can have multiple match conditions - the sampler will be applied if all match. | ||
| # If no conditions are specified, the rule matches all spans that reach it. If no rules match, the span is not sampled. | ||
| rules: | ||
| - attribute_values: | ||
| key: http.route | ||
| values: | ||
| - /healthz | ||
| - /livez | ||
| # Configure sampler when matched. | ||
| sampler: | ||
| # Configure sampler to be always_off if matched. | ||
| always_off: # Configure a sampling rule matching http.path attribute patterns. | ||
| - attribute_patterns: | ||
| key: http.path | ||
| patterns: | ||
|
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 wonder if "patterns:" can be eliminated from the schema. The context is already about patterns.
Contributor
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. Thanks - this seems like a good idea to me to keep configs cleaner. One issue is that it prevents having
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. We have schema modeleling rules advising against using JSON schema's compoisition keywords: allOf, anyOf, oneOf If I understand correctly, we're talking about the difference between: and: The latter is more terse, but without use of No strong opinion from me.
Contributor
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. Thanks - yeah good call that those composition words can be tricky in non-scripting languages. I went with defining them inline as-is then |
||
| included: | ||
| - /internal/* | ||
| excluded: | ||
| - /internal/special/* | ||
| # Configure sampler when matched. | ||
| sampler: | ||
| # Configure sampler to be always_on if matched. | ||
| always_on: # Configure a sampling rule matching root spans with CLIENT span kind. | ||
|
anuraaga marked this conversation as resolved.
Outdated
|
||
| - is_trace_root: true | ||
| span_kinds: | ||
| - CLIENT | ||
| sampler: | ||
| # Configure sampler to be trace_id_ratio_based if matched. | ||
| trace_id_ratio_based: | ||
|
anuraaga marked this conversation as resolved.
Outdated
|
||
| ratio: 0.05 | ||
| - sampler: | ||
| probability: | ||
| # Configure ratio. | ||
| # If omitted or null, 1.0 is used. | ||
| ratio: 0.001 | ||
| # Configure local_parent_not_sampled sampler. | ||
| # If omitted or null, always_off is used. | ||
| local_parent_not_sampled: | ||
| always_off: | ||
| tracer_configurator/development: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.