Duansg opened a new pull request, #7834: URL: https://github.com/apache/shenyu/pull/7834
Fix inconsistent logging sample rate validation in `CountSampler.create()`. - Recognize equivalent zero values such as `"0.0"`, `"-0.0"` and `"0e0"` as disabling sampling instead of rejecting them. - Explicitly reject non-finite values, preventing `NaN` from bypassing validation and silently disabling log collection. - Update the validation message to clarify that valid values are `0` or between `0.01` and `1`. - Preserve existing defaults and sampling behavior for valid rates. Add parameterized tests covering zero representations, invalid values, default behavior, and sample counts across consecutive 100-request cycles. Make sure that: - [x] You have read the [contribution guidelines](https://shenyu.apache.org/community/contributor-guide). - [x] You submit test cases (unit or integration tests) that back your changes. - [x] Your local test passed `./mvnw clean install -Dmaven.javadoc.skip=true`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
