You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: posthog/__init__.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -76,15 +76,15 @@
76
76
77
77
defnew_context(
78
78
fresh: bool=False,
79
-
capture_exceptions: bool=True,
79
+
capture_exceptions: Optional[bool]=None,
80
80
client: Optional[Client] =None,
81
81
):
82
82
"""
83
83
Create a new context scope that will be active for the duration of the with block.
84
84
85
85
Args:
86
86
fresh: Whether to start with a fresh context (default: False)
87
-
capture_exceptions: Whether to capture exceptions raised within the context (default: True)
87
+
capture_exceptions: Whether to capture exceptions raised within the context. If omitted, defaults to the relevant client's exception autocapture setting.
88
88
client: Optional Posthog client instance to use for this context (default: None)
Decorator that creates a new context for the function.
109
109
110
110
Args:
111
111
fresh: Whether to start with a fresh context (default: False)
112
-
capture_exceptions: Whether to capture and track exceptions with posthog error tracking (default: True)
112
+
capture_exceptions: Whether to capture and track exceptions with posthog error tracking. If omitted, defaults to the global exception autocapture setting.
Decorator that creates a new context for the function. Simply wraps
376
399
the function in a with posthog.new_context(): block.
377
400
378
401
Args:
379
402
fresh: Whether to start with a fresh context (default: False)
380
-
capture_exceptions: Whether to capture and track exceptions with posthog error tracking (default: True)
403
+
capture_exceptions: Whether to capture and track exceptions with posthog error tracking. If omitted, defaults to the global exception autocapture setting.
0 commit comments