dd-trace-py icon indicating copy to clipboard operation
dd-trace-py copied to clipboard

Sample rate feature is not working (at all)

Open organic1337 opened this issue 1 year ago • 1 comments

Summary of problem

After a lot of debugging I found that sample rate feature does not work for this implementation. I discovered it while trying to set sample rate to 0.0 and still received traces.

Which version of dd-trace-py are you using?

2.8.1

Which version of pip are you using?

24.0

How can we reproduce your problem?

What I did was setting installing ddtrace in my local environment, then set the DD_TRACE_SAMPLE_RATE env variable to 0, and also use env vars for configuring dd agent host.

Run something that usually sends a trace and see that races will appear on dd even if sample rate is zero.

What is the result that you get?

I get traces on dd even though they should not appear.

What is the result that you expected?

No traces on dd when sample rate is zero.

organic1337 avatar Apr 22 '24 20:04 organic1337

Thanks for the report, @organic1337. The sampling configuration on this library is complex and it's possible that there are bugs.

cc @ZStriker19 - I'm looking through the existing sampling integration tests and not seeing one that sets the sample rate to zero.

emmettbutler avatar Apr 23 '24 14:04 emmettbutler

This issue has been automatically closed after a period of inactivity. If it's a feature request, it has been added to the maintainers' internal backlog and will be included in an upcoming round of feature prioritization. Please comment or reopen if you think this issue was closed in error.

github-actions[bot] avatar Sep 21 '24 00:09 github-actions[bot]