feat(prof): configurable allocation sampling distance#3227
feat(prof): configurable allocation sampling distance#3227realFlowControl merged 5 commits intomasterfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3227 +/- ##
=========================================
Coverage 71.41% 71.41%
Complexity 2948 2948
=========================================
Files 118 118
Lines 11633 11633
=========================================
Hits 8308 8308
Misses 3325 3325
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
0802dd0 to
0c5e8bd
Compare
Benchmarks [ profiler ]Benchmark execution time: 2025-05-08 06:58:03 Comparing candidate commit c002610 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 28 metrics, 8 unstable metrics. |
d16b77a to
dbf9537
Compare
dbf9537 to
97b9d21
Compare
There was a problem hiding this comment.
I have some nits with the PR, but I do have a bigger concern: if we add dynamic sampling, how are these supposed to interact? I wonder how Python has done things recently, we should maybe align, or if they need to change something, better to do it now before it gets widely adopted. Maybe DD_PROFILING_ALLOCATION_SAMPLING_DISTANCE=dynamic?
|
Thats exactly the idea, |
Description
This makes the allocation profiling sampling distance (formerly fixed 4MB) configurable through the
DD_PROFILING_ALLOCATION_SAMPLING_DISTANCEenvironment variable ordatadog.profiling.allocation_sampling_distancePHP INI setting.In most cases this is true, but if your application is heavily allocating lots of memory you'd see elevated overhead from the allocation profiler. This feature gives you a level to adjust in case you do want allocation profiling, but see elevated overhead because the application you are running is allocating a lot of memory.
Reviewer checklist
PROF-11753