Coverage for /var/srv/projects/api.amasfac.comuna18.com/tmp/venv/lib/python3.9/site-packages/sentry_sdk/_types.py: 12%
32 statements
« prev ^ index » next coverage.py v6.4.4, created at 2023-07-17 14:22 -0600
« prev ^ index » next coverage.py v6.4.4, created at 2023-07-17 14:22 -0600
1try:
2 from typing import TYPE_CHECKING as MYPY
3except ImportError:
4 MYPY = False
7if MYPY: 7 ↛ 8line 7 didn't jump to line 8, because the condition on line 7 was never true
8 from types import TracebackType
9 from typing import Any
10 from typing import Callable
11 from typing import Dict
12 from typing import Optional
13 from typing import Tuple
14 from typing import Type
15 from typing import Union
16 from typing_extensions import Literal
18 ExcInfo = Tuple[
19 Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]
20 ]
22 Event = Dict[str, Any]
23 Hint = Dict[str, Any]
25 Breadcrumb = Dict[str, Any]
26 BreadcrumbHint = Dict[str, Any]
28 SamplingContext = Dict[str, Any]
30 EventProcessor = Callable[[Event, Hint], Optional[Event]]
31 ErrorProcessor = Callable[[Event, ExcInfo], Optional[Event]]
32 BreadcrumbProcessor = Callable[[Breadcrumb, BreadcrumbHint], Optional[Breadcrumb]]
34 TracesSampler = Callable[[SamplingContext], Union[float, int, bool]]
36 # https://github.com/python/mypy/issues/5710
37 NotImplementedType = Any
39 EventDataCategory = Literal[
40 "default",
41 "error",
42 "crash",
43 "transaction",
44 "security",
45 "attachment",
46 "session",
47 "internal",
48 ]
49 SessionStatus = Literal["ok", "exited", "crashed", "abnormal"]
50 EndpointType = Literal["store", "envelope"]
52 DurationUnit = Literal[
53 "nanosecond",
54 "microsecond",
55 "millisecond",
56 "second",
57 "minute",
58 "hour",
59 "day",
60 "week",
61 ]
63 InformationUnit = Literal[
64 "bit",
65 "byte",
66 "kilobyte",
67 "kibibyte",
68 "megabyte",
69 "mebibyte",
70 "gigabyte",
71 "gibibyte",
72 "terabyte",
73 "tebibyte",
74 "petabyte",
75 "pebibyte",
76 "exabyte",
77 "exbibyte",
78 ]
80 FractionUnit = Literal["ratio", "percent"]
81 MeasurementUnit = Union[DurationUnit, InformationUnit, FractionUnit, str]