-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
client_sample_rate
for auto instrumented Queue spans is always 1 in UI even if sampled at a lower rate.
#946
Comments
Hmm, this works fine for me: https://sentry-sdks.sentry.io/performance/trace/4169ef053f87462c813a181ede76c051 'traces_sampler' => function() {
return 0.1;
}, |
Can you show a bit more about how exactly the I also cannot reproduce and the sample rate is shown correctly as 0.99. |
Hey sorry, I should of clarified more. For me It only happens on the queue spans. The normal network request spans work fine when I sample them. I edited the tracesSampler to include a network request span, and the client sample rate is shown properly. Here is the entire tracesSampler -
This is the new Queue span that shows a client_sample_rate of 1 instead of 0.1 And this is the new http.server /store-cache network span that correctly shows 0.98 |
Okay, I've setup a database queue like you did and fired a job but still: I did simplify the 'traces_sampler' => static function() {
return 0.99;
}, Wondering what variable we are missing here that causes this. I am on Laravel 11.16 and using the 4.9.0 of the Laravel SDK, but that has no relevant changes as far as I can see. |
I changed the traces_sampler to yours and also updated laravel and Sentry. I still see the same thing. Maybe it's because of how I am triggering the transaction? I tried to replicate a users set up who also ran into this issue. I'm running I made a screen recording of exactly how I'm doing it if this helps at all Screen.Recording.2024-10-10.at.12.39.13.AM.mov |
There might be something off when we transform the data into an envelope. I have no other ideas tbh. cc @stayallive |
I am so puzzled right now. I really appreciate all the info you are giving is. And seeing this I think I'm replicating it correctly on my end but with a different result so trying to figure out where the missing link is. Are you able to show us how you dispatch the job and maybe even a little of what the job is doing (is it doing anything "special" like a HTTP call or calling a route in the application etc.). Again, appreciate the help with figuring this out because I think there is a bug indeed. It's just very specific 🥲 |
One thought I just had is, that it looks like we apply the parent sampling decision we propagate to the queue job with higher priority than the traces sampler, hence it's always |
This is a good one to test indeed, will need to just try some stuff. Def something not right here. |
How do you use Sentry?
Sentry SaaS (sentry.io)
SDK version
4.8.0
Laravel version
11.9
Steps to reproduce
Link to the transaction
Expected result
client_sample_rate should show as .1 like I have set in the tracesSampler
Actual result
client_sample_rate shows as 1 even though I do not have 1 set anywhere in my tracesSampler
The text was updated successfully, but these errors were encountered: