-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
ref(core): Move log message about invalid sample rate #15215
Conversation
@@ -41,7 +41,12 @@ export function sampleSpan( | |||
const parsedSampleRate = parseSampleRate(sampleRate); | |||
|
|||
if (parsedSampleRate === undefined) { | |||
DEBUG_BUILD && logger.warn('[Tracing] Discarding transaction because of invalid sample rate.'); | |||
DEBUG_BUILD && | |||
logger.trace( |
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.
l: why use logger.trace
here vs. logger.log
or similar?
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.
whoops, I used trace to debug. Switching back... Thanks!
size-limit report 📦
|
@@ -20,7 +20,7 @@ export function hasTracingEnabled( | |||
const options = maybeOptions || client?.getOptions(); | |||
return ( | |||
!!options && | |||
// Note: This check is `!= null`, meaning "nullish" | |||
// Note: This check is `!= null`, meaning "nullish". `0` is not "nullish", `undefined` and `null` are. (This comment was brought to you by 15 minutes of questioning life) |
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.
lol <3
Co-authored-by: Lukas Stracke <[email protected]>
❌ 1 Tests Failed:
View the top 1 failed tests by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
The location we logged a message about an invalid sample rate was way too central. Originally we only logged it in the sampler but nowadays it is used in a bunch of other places like replay or propagation logic where it makes no sense to log the message.