File tree Expand file tree Collapse file tree 2 files changed +16
-14
lines changed
Expand file tree Collapse file tree 2 files changed +16
-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,34 @@ def try_profile_lifecycle_trace_start():
145145
146146def start_profiler ():
147147 # type: () -> None
148+ if _scheduler is None :
149+ return
150+
151+ _scheduler .manual_start ()
148152
149- # TODO: deprecate this as it'll be replaced by `start_profile_session`
150- start_profile_session ()
151153
152154
153155def start_profile_session ():
154156 # type: () -> None
155- if _scheduler is None :
156- return
157157
158- _scheduler .manual_start ()
158+ # TODO: deprecate this as it'll be replaced by `start_profiler`
159+ start_profiler ()
159160
160161
161162def stop_profiler ():
162163 # type: () -> None
164+ if _scheduler is None :
165+ return
163166
164- # TODO: deprecate this as it'll be replaced by `stop_profile_session`
165- stop_profile_session ()
167+ _scheduler .manual_stop ()
166168
167169
168170def stop_profile_session ():
169171 # type: () -> None
170- if _scheduler is None :
171- return
172172
173- _scheduler .manual_stop ()
173+ # TODO: deprecate this as it'll be replaced by `stop_profiler`
174+ stop_profiler ()
175+
174176
175177
176178def teardown_continuous_profiler ():
You can’t perform that action at this time.
0 commit comments