File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,10 @@ def capture_exception(error=None):
3131
3232
3333@public
34- def add_breadcrumb (crumb ):
34+ def add_breadcrumb (* args , ** kwargs ):
3535 hub = Hub .current
3636 if hub is not None :
37- return hub .add_breadcrumb (crumb )
37+ return hub .add_breadcrumb (* args , ** kwargs )
3838
3939
4040@public
@@ -48,6 +48,11 @@ def configure_scope():
4848 yield Scope ()
4949
5050
51+ @public
52+ def get_current_hub ():
53+ return Hub .current
54+
55+
5156try :
5257 from sentry_sdk import Hub , Scope
5358except ImportError :
Original file line number Diff line number Diff line change 1212
1313for _key in sentry_minimal .__all__ :
1414 globals ()[_key ] = getattr (sentry_minimal , _key )
15+ globals ()[_key ].__module__ = __name__
16+ del _key
1517
1618
1719class _InitGuard (object ):
Original file line number Diff line number Diff line change @@ -144,10 +144,12 @@ def add_breadcrumb(self, crumb):
144144
145145 def add_event_processor (self , factory ):
146146 """Registers a new event processor with the top scope."""
147- self ._pending_processors .append (factory )
147+ if self ._stack [1 ][0 ] is not None :
148+ self ._pending_processors .append (factory )
148149
149150 def push_scope (self ):
150151 """Pushes a new layer on the scope stack."""
152+ self ._flush_event_processors ()
151153 client , scope = self ._stack [- 1 ]
152154 self ._stack .append ((client , copy .copy (scope )))
153155 return _ScopeManager (self )
You can’t perform that action at this time.
0 commit comments