-
Notifications
You must be signed in to change notification settings - Fork 549
feat(profiling): Introduce continuous profiling mode #2830
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
Merged
sentrivana
merged 47 commits into
master
from
txiao/feat/introduce-continuous-profiling-mode
Jun 11, 2024
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
984695e
feat(profiling): Introduce continuous profiling mode
Zylphrex 92e3263
fix up import and a few things
Zylphrex 455778b
set timestamp accordingly
Zylphrex 3452c7e
ensure thread running at start of transaction
Zylphrex 12cfee6
fix import
Zylphrex b1be566
format json
Zylphrex 60efea7
some basic tests + teardown
Zylphrex fd1fa37
Merge branch 'master' into txiao/feat/introduce-continuous-profiling-…
Zylphrex dea4987
send envelope
Zylphrex ca4594c
run black
Zylphrex 94e77cd
add another test but it doesnt work yet
Zylphrex bf81ab2
test should work now
Zylphrex 96b1807
run lint
Zylphrex 420d5b8
should be chunk id
Zylphrex c59adb1
single timestamp per profiler id
Zylphrex ec1240d
lint
Zylphrex fa5e0d4
ensure chunks are flushed
Zylphrex 988f609
add profiler id to span data
Zylphrex 719dc1a
fix circular import
Zylphrex f7f488e
fix lint
Zylphrex aa177de
Merge branch 'master' of github.com:getsentry/sentry-python into txia…
Zylphrex f70a04a
Merge branch 'master' into txiao/feat/introduce-continuous-profiling-…
Zylphrex c1e2bb5
lint
Zylphrex 02cbba2
expose start/stop apis
Zylphrex dff3b9c
autostart profiler once per process
Zylphrex e4289aa
Merge branch 'master' into txiao/feat/introduce-continuous-profiling-…
Zylphrex d0b7704
Merge branch 'master' into txiao/feat/introduce-continuous-profiling-…
Zylphrex af4e370
change to auto start and manual start api
Zylphrex 7ec70c7
fix test
Zylphrex 0937dd2
fix test
Zylphrex 10f38bc
run black
Zylphrex 4276b32
Merge branch 'master' into txiao/feat/introduce-continuous-profiling-…
Zylphrex 62d8dde
address PR feedback
Zylphrex f33dfb8
Merge branch 'master' of github.com:getsentry/sentry-python into txia…
Zylphrex 4f78dfc
move into profiler folder
Zylphrex 22fb4d2
fix tests and format
Zylphrex 235db8a
fix tests
Zylphrex 578e1e9
fix tests
Zylphrex ed66f59
move thread id/name into trace context
Zylphrex 404fa45
fix api docs
Zylphrex 8020324
move common imports
Zylphrex e8df608
Revert "move thread id/name into trace context"
Zylphrex 817c570
export start/stop profiler
Zylphrex fdb17e5
Merge branch 'master' into txiao/feat/introduce-continuous-profiling-…
antonpirker 29cb67d
re-export profiler for back compat
Zylphrex 2d3ae96
Merge branch 'master' into txiao/feat/introduce-continuous-profiling-…
sentrivana 0c80a5b
Merge branch 'master' into txiao/feat/introduce-continuous-profiling-…
sentrivana File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from sentry_sdk.profiler.continuous_profiler import start_profiler, stop_profiler | ||
from sentry_sdk.profiler.transaction_profiler import ( | ||
MAX_PROFILE_DURATION_NS, | ||
PROFILE_MINIMUM_SAMPLES, | ||
Profile, | ||
Scheduler, | ||
ThreadScheduler, | ||
GeventScheduler, | ||
has_profiling_enabled, | ||
setup_profiler, | ||
teardown_profiler, | ||
) | ||
from sentry_sdk.profiler.utils import ( | ||
DEFAULT_SAMPLING_FREQUENCY, | ||
MAX_STACK_DEPTH, | ||
get_frame_name, | ||
extract_frame, | ||
extract_stack, | ||
frame_id, | ||
) | ||
|
||
__all__ = [ | ||
"start_profiler", | ||
"stop_profiler", | ||
# Re-exported for backwards compatibility | ||
"MAX_PROFILE_DURATION_NS", | ||
"PROFILE_MINIMUM_SAMPLES", | ||
"Profile", | ||
"Scheduler", | ||
"ThreadScheduler", | ||
"GeventScheduler", | ||
"has_profiling_enabled", | ||
"setup_profiler", | ||
"teardown_profiler", | ||
"DEFAULT_SAMPLING_FREQUENCY", | ||
"MAX_STACK_DEPTH", | ||
"get_frame_name", | ||
"extract_frame", | ||
"extract_stack", | ||
"frame_id", | ||
] |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.