-
Notifications
You must be signed in to change notification settings - Fork 177
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
MWPW-159555 Add support for lana-sample query param #3045
Conversation
The `lana-sample` query param will override any sample rate defined elsewhere. Setting it to "100" will force lana to send everything to splunk.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## stage #3045 +/- ##
=======================================
Coverage 96.34% 96.34%
=======================================
Files 243 243
Lines 55284 55288 +4
=======================================
+ Hits 53261 53265 +4
Misses 2023 2023 ☔ View full report in Codecov by Sentry. |
This pull request is not passing all required checks. Please see this discussion for information on how to get all checks passing. Inconsistent checks can be manually retried. If a test absolutely can not pass for a good reason, please add a comment with an explanation to the PR. |
Hi @chrischrischris can you provide some guidance on how testing should be performed for this change? thank you |
Seems the new unit test is failing - |
Reminder to set the |
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.
Assuming someone will always send in a valid integer between 0 and 100 is dangerous without any (apparent) input validation or error handling. What happens if I send in an invalid number or a value long enough to be a BigInt? Would lana know what to do if it got a NaN in this param?
7391864
to
a18ae2d
Compare
@thedoc31 The
It's fine if the param is negative or a gigantic number. Negative will behave like 0, anything over 100 behaves like 100. I've added a test case for an invalid param value. |
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.
Verified, ready to STAGE
The parseInt and existing code provide sufficient validation and the extra test case will validate that. Closing objection
The
lana-sample
query param will override any sample rate defined elsewhere. Setting it to "100" will force lana to send everything to splunk.Resolves: MWPW-159555
Test URLs: