|
1 | 1 | import datetime # noqa: F401 |
2 | | -from typing import Callable, Dict, Optional, Any # noqa: F401 |
| 2 | +from typing import Any, Callable, Dict, Optional # noqa: F401 |
| 3 | + |
3 | 4 | from typing_extensions import Unpack |
4 | 5 |
|
5 | | -from posthog.args import OptionalCaptureArgs, OptionalSetArgs, ExceptionArg |
| 6 | +from posthog.args import ExceptionArg, OptionalCaptureArgs, OptionalSetArgs |
6 | 7 | from posthog.client import Client |
| 8 | +from posthog.contexts import ( |
| 9 | + identify_context as inner_identify_context, |
| 10 | +) |
7 | 11 | from posthog.contexts import ( |
8 | 12 | new_context as inner_new_context, |
| 13 | +) |
| 14 | +from posthog.contexts import ( |
9 | 15 | scoped as inner_scoped, |
10 | | - tag as inner_tag, |
11 | | - set_context_session as inner_set_context_session, |
12 | | - identify_context as inner_identify_context, |
| 16 | +) |
| 17 | +from posthog.contexts import ( |
13 | 18 | set_capture_exception_code_variables_context as inner_set_capture_exception_code_variables_context, |
14 | | - set_code_variables_mask_patterns_context as inner_set_code_variables_mask_patterns_context, |
| 19 | +) |
| 20 | +from posthog.contexts import ( |
15 | 21 | set_code_variables_ignore_patterns_context as inner_set_code_variables_ignore_patterns_context, |
16 | 22 | ) |
| 23 | +from posthog.contexts import ( |
| 24 | + set_code_variables_mask_patterns_context as inner_set_code_variables_mask_patterns_context, |
| 25 | +) |
| 26 | +from posthog.contexts import ( |
| 27 | + set_context_session as inner_set_context_session, |
| 28 | +) |
| 29 | +from posthog.contexts import ( |
| 30 | + tag as inner_tag, |
| 31 | +) |
17 | 32 | from posthog.exception_utils import ( |
18 | 33 | DEFAULT_CODE_VARIABLES_IGNORE_PATTERNS, |
19 | 34 | DEFAULT_CODE_VARIABLES_MASK_PATTERNS, |
20 | 35 | ) |
21 | 36 | from posthog.feature_flags import ( |
22 | 37 | InconclusiveMatchError as InconclusiveMatchError, |
| 38 | +) |
| 39 | +from posthog.feature_flags import ( |
23 | 40 | RequiresServerEvaluation as RequiresServerEvaluation, |
24 | 41 | ) |
25 | 42 | from posthog.types import ( |
26 | 43 | FeatureFlag, |
27 | 44 | FlagsAndPayloads, |
| 45 | +) |
| 46 | +from posthog.types import ( |
28 | 47 | FeatureFlagResult as FeatureFlagResult, |
29 | 48 | ) |
30 | 49 | from posthog.version import VERSION |
@@ -191,6 +210,7 @@ def tag(name: str, value: Any): |
191 | 210 | capture_exception_code_variables = False |
192 | 211 | code_variables_mask_patterns = DEFAULT_CODE_VARIABLES_MASK_PATTERNS |
193 | 212 | code_variables_ignore_patterns = DEFAULT_CODE_VARIABLES_IGNORE_PATTERNS |
| 213 | +in_app_modules = None # type: Optional[list[str]] |
194 | 214 |
|
195 | 215 |
|
196 | 216 | # NOTE - this and following functions take unpacked kwargs because we needed to make |
@@ -789,6 +809,7 @@ def setup() -> Client: |
789 | 809 | capture_exception_code_variables=capture_exception_code_variables, |
790 | 810 | code_variables_mask_patterns=code_variables_mask_patterns, |
791 | 811 | code_variables_ignore_patterns=code_variables_ignore_patterns, |
| 812 | + in_app_modules=in_app_modules, |
792 | 813 | ) |
793 | 814 |
|
794 | 815 | # always set incase user changes it |
|
0 commit comments