-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow config bools to default to true (#969)
## Which problem is this PR solving? - #954 ## Short description of the changes - add a failing test to reproduce the problem - updated config struct fields that are bools defaulting to true to be bool pointers so that nil represents the unset state - updated getter functions to handle the pointers - [x] add a GetSamplerEnabled() function to HoneycombLoggerConfig to handle pointer defreferencing ## Maybe TODO - [ ] use something (reflect?) to do struct tag lookups to find default values in the getter functions instead of declaring defaults in multiple places - [ ] keep the default-true-bool-overridden-with-false test? - [ ] contribute documentation about bool pointer workaround to upstream defaults library? --------- Co-authored-by: Faith Chikwekwe <[email protected]> Co-authored-by: Faith Chikwekwe <[email protected]>
- Loading branch information
1 parent
63e6e81
commit 451d00e
Showing
4 changed files
with
84 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"RulesVersion":2,"Samplers":{"__default__":{"DeterministicSampler":{"SampleRate":1}},"TheNewWorld":{"EMADynamicSampler":{"GoalSampleRate":6,"AdjustmentInterval":"2s","Weight":0.5,"AgeOutValue":0.5,"BurstMultiple":200,"BurstDetectionDelay":30,"FieldList":["error","url","status"],"UseTraceLength":false,"MaxKeys":2000}}}} |