-
Notifications
You must be signed in to change notification settings - Fork 457
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
profiler: support reconfiguring execution tracing at runtime #1978
Merged
+33
−12
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
Have the profiler check the execution tracing configuration environment variables at the beginning of each profiling cycle. That way, the environment variables can be updated at run-time. This will give initial users the flexibility to, for example, increase collection frequency during periods where they suspect a performance issue is happening, without requiring us to commit to a public interface for triggering or reconfiguring trace collection.
felixge
approved these changes
May 10, 2023
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. Having a test would be nice, but not critical.
nsrip-dd
added a commit
that referenced
this pull request
May 24, 2023
go_execution_trace_enabled indicates whether execution tracing is enabled, to distinguish between missing a trace because we don't collect them every profiling cycle from missing a trace because the feature isn't turned on. While we're here, add these extra tracing tags to the batch object that's built during the profiling cycle. We can't safely read the execution trace config during the uploading, because it can be modified concurrently by the profiler after #1978. It makes more sense to have the profiler add all the needed information, which it can do safely, so that the upload step can just deal with uploading.
2 tasks
katiehockman
pushed a commit
that referenced
this pull request
Jun 6, 2023
Have the profiler check the execution tracing configuration environment variables at the beginning of each profiling cycle. That way, the environment variables can be updated at run-time. This will give initial users the flexibility to, for example, increase collection frequency during periods where they suspect a performance issue is happening, without requiring us to commit to a public interface for triggering or reconfiguring trace collection.
nsrip-dd
added a commit
that referenced
this pull request
Jun 9, 2023
…1997) Add a _dd.profiler.go_execution_trace_enabled tag to uploaded profiles. Indicate whether execution tracing is enabled, to distinguish between missing a trace because we don't collect them every profiling cycle from missing a trace because the feature isn't turned on. While we're here, add these extra tracing tags to the batch object that's built during the profiling cycle. We can't safely read the execution trace config during the uploading, because it can be modified concurrently by the profiler after #1978. It makes more sense to have the profiler add all the needed information, which it can do safely, so that the upload step can just deal with uploading.
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?
Have the profiler check the execution tracing configuration environment
variables at the beginning of each profiling cycle. That way, the environment
variables can be updated at run-time.
Motivation
Give initial users the flexibility to, for example, increase collection
frequency during periods where they suspect a performance issue is happening,
without requiring us to commit to a public interface for triggering or
reconfiguring trace collection.
Describe how to test/QA your changes
TODO. The existing tests pass. Perhaps worth adding an additional test to see
if updating the configuration works.
Reviewer's Checklist