File tree Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 2525)
2626
2727__all__ = [
28- "start_profile_session" ,
29- "start_profiler" , # TODO: Deprecate this in favor of `start_profile_session`
30- "stop_profile_session" ,
31- "stop_profiler" , # TODO: Deprecate this in favor of `stop_profile_session`
28+ "start_profile_session" , # TODO: Deprecate this in favor of `start_profiler`
29+ "start_profiler" ,
30+ "stop_profile_session" , # TODO: Deprecate this in favor of `stop_profiler`
31+ "stop_profiler" ,
3232 # DEPRECATED: The following was re-exported for backwards compatibility. It
3333 # will be removed from sentry_sdk.profiler in a future release.
3434 "MAX_PROFILE_DURATION_NS" ,
Original file line number Diff line number Diff line change @@ -145,32 +145,32 @@ def try_profile_lifecycle_trace_start():
145145
146146def start_profiler ():
147147 # type: () -> None
148+ if _scheduler is None :
149+ return
148150
149- # TODO: deprecate this as it'll be replaced by `start_profile_session`
150- start_profile_session ()
151+ _scheduler .manual_start ()
151152
152153
153154def start_profile_session ():
154155 # type: () -> None
155- if _scheduler is None :
156- return
157156
158- _scheduler .manual_start ()
157+ # TODO: deprecate this as it'll be replaced by `start_profiler`
158+ start_profiler ()
159159
160160
161161def stop_profiler ():
162162 # type: () -> None
163+ if _scheduler is None :
164+ return
163165
164- # TODO: deprecate this as it'll be replaced by `stop_profile_session`
165- stop_profile_session ()
166+ _scheduler .manual_stop ()
166167
167168
168169def stop_profile_session ():
169170 # type: () -> None
170- if _scheduler is None :
171- return
172171
173- _scheduler .manual_stop ()
172+ # TODO: deprecate this as it'll be replaced by `stop_profiler`
173+ stop_profiler ()
174174
175175
176176def teardown_continuous_profiler ():
You can’t perform that action at this time.
0 commit comments