-
Notifications
You must be signed in to change notification settings - Fork 373
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
[PROF-9044] Handle timing hiccups #3440
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…of-9045-alloc-sampling-spikes-within-windows
AlexJF
force-pushed
the
alexjf/prof-9044-handle-timing-hiccups
branch
from
February 7, 2024 11:16
95cdf19
to
a07ac12
Compare
ivoanjo
approved these changes
Feb 7, 2024
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.
👍 LGTM
The macOS CI failures are unrelated -- #3444 .
spec/datadog/profiling/collectors/discrete_dynamic_sampler_spec.rb
Outdated
Show resolved
Hide resolved
spec/datadog/profiling/collectors/discrete_dynamic_sampler_spec.rb
Outdated
Show resolved
Hide resolved
spec/datadog/profiling/collectors/discrete_dynamic_sampler_spec.rb
Outdated
Show resolved
Hide resolved
ext/ddtrace_profiling_native_extension/collectors_discrete_dynamic_sampler.c
Show resolved
Hide resolved
…' into alexjf/prof-9044-handle-timing-hiccups
…c.rb Co-authored-by: Ivo Anjo <ivo.anjo@datadoghq.com>
…ataDog/dd-trace-rb into alexjf/prof-9044-handle-timing-hiccups
ivoanjo
approved these changes
Mar 4, 2024
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.
👍 LGTM
spec/datadog/profiling/collectors/discrete_dynamic_sampler_spec.rb
Outdated
Show resolved
Hide resolved
…c.rb Co-authored-by: Ivo Anjo <ivo.anjo@datadoghq.com>
Base automatically changed from
alexjf/prof-9035-handle-clock-errors-allocation-sampler
to
master
March 5, 2024 11:31
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Introduce a mechanism so that point-in-time hiccups in timing information cannot effectively lead to disabling of the sampler for whole minutes.
Motivation:
VM suspension, system overload and other noise may occasionally lead to timing hiccups where time where the application was suspended is misattributed to time spent sampling (e.g. VM suspension occurs in between calls to
should_sample
andafter_sample
).This (hopefully) rare occurrence can skew our sampling statistics so much that the sampler would be effectively disabled for whole minutes. We want to limit this impact and try to have the sampler ignore sampling times that are deemed too big (our reference target is that, if forced to sample, we want to sample at least 1 event per second).
Additional Notes:
This PR tells a story:
How to test the change?
For Datadog employees:
credentials of any kind, I've requested a review from
@DataDog/security-design-and-guidance
.Unsure? Have a question? Request a review!