massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / aws-xray-sdk / aws_xray_sdk / core / recorder.pyi
1 import time
2 from logging import Logger
3 from typing import Any, Callable, Iterable
4
5 from aws_xray_sdk import global_sdk_config as global_sdk_config
6 from aws_xray_sdk.version import VERSION as VERSION
7
8 from .context import Context as Context
9 from .daemon_config import DaemonConfig as DaemonConfig
10 from .emitters.udp_emitter import UDPEmitter as UDPEmitter
11 from .exceptions.exceptions import (
12     SegmentNameMissingException as SegmentNameMissingException,
13     SegmentNotFoundException as SegmentNotFoundException,
14 )
15 from .lambda_launcher import check_in_lambda as check_in_lambda
16 from .models.default_dynamic_naming import DefaultDynamicNaming as DefaultDynamicNaming
17 from .models.dummy_entities import DummySegment as DummySegment, DummySubsegment as DummySubsegment
18 from .models.segment import Segment as Segment, SegmentContextManager as SegmentContextManager
19 from .models.subsegment import Subsegment as Subsegment, SubsegmentContextManager as SubsegmentContextManager
20 from .plugins.utils import get_plugin_modules as get_plugin_modules
21 from .sampling.local.sampler import LocalSampler as LocalSampler
22 from .sampling.sampler import DefaultSampler as DefaultSampler
23 from .streaming.default_streaming import DefaultStreaming as DefaultStreaming
24 from .utils import stacktrace as stacktrace
25 from .utils.compat import string_types as string_types
26
27 log: Logger
28 TRACING_NAME_KEY: str
29 DAEMON_ADDR_KEY: str
30 CONTEXT_MISSING_KEY: str
31 XRAY_META: Any
32 SERVICE_INFO: Any
33
34 class AWSXRayRecorder:
35     def __init__(self) -> None: ...
36     def configure(
37         self,
38         sampling: bool | None = ...,
39         plugins: Iterable[str] | None = ...,
40         context_missing: str | None = ...,
41         sampling_rules: dict[str, Any] | str | None = ...,
42         daemon_address: str | None = ...,
43         service: str | None = ...,
44         context: Context | None = ...,
45         emitter: UDPEmitter | None = ...,
46         streaming: DefaultStreaming | None = ...,
47         dynamic_naming: DefaultDynamicNaming | None = ...,
48         streaming_threshold: int | None = ...,
49         max_trace_back: int | None = ...,
50         sampler: LocalSampler | DefaultSampler | None = ...,
51         stream_sql: bool | None = ...,
52     ) -> None: ...
53     def in_segment(self, name: str | None = ..., **segment_kwargs) -> SegmentContextManager: ...
54     def in_subsegment(self, name: str | None = ..., **subsegment_kwargs) -> SubsegmentContextManager: ...
55     def begin_segment(
56         self, name: str | None = ..., traceid: str | None = ..., parent_id: str | None = ..., sampling: bool | None = ...
57     ) -> Segment | DummySegment: ...
58     def end_segment(self, end_time: time.struct_time | None = ...) -> None: ...
59     def current_segment(self) -> Segment: ...
60     def begin_subsegment(self, name: str, namespace: str = ...) -> DummySubsegment | Subsegment | None: ...
61     def current_subsegment(self) -> Subsegment | DummySubsegment | None: ...
62     def end_subsegment(self, end_time: time.struct_time | None = ...) -> None: ...
63     def put_annotation(self, key: str, value: Any) -> None: ...
64     def put_metadata(self, key: str, value: Any, namespace: str = ...) -> None: ...
65     def is_sampled(self) -> bool: ...
66     def get_trace_entity(self) -> Segment | Subsegment | DummySegment | DummySubsegment: ...
67     def set_trace_entity(self, trace_entity: Segment | Subsegment | DummySegment | DummySubsegment) -> None: ...
68     def clear_trace_entities(self) -> None: ...
69     def stream_subsegments(self) -> None: ...
70     def capture(self, name: str | None = ...) -> SubsegmentContextManager: ...
71     def record_subsegment(
72         self,
73         wrapped: Callable[..., Any],
74         instance: Any,
75         args: list[Any],
76         kwargs: dict[str, Any],
77         name: str,
78         namespace: str,
79         meta_processor: Callable[..., Any],
80     ) -> Any: ...
81     @property
82     def enabled(self) -> bool: ...
83     @enabled.setter
84     def enabled(self, value: bool) -> None: ...
85     @property
86     def sampling(self) -> bool: ...
87     @sampling.setter
88     def sampling(self, value: bool) -> None: ...
89     @property
90     def sampler(self) -> LocalSampler | DefaultSampler: ...
91     @sampler.setter
92     def sampler(self, value: LocalSampler | DefaultSampler) -> None: ...
93     @property
94     def service(self) -> str: ...
95     @service.setter
96     def service(self, value: str) -> None: ...
97     @property
98     def dynamic_naming(self) -> Any | DefaultDynamicNaming: ...
99     @dynamic_naming.setter
100     def dynamic_naming(self, value: Any | DefaultDynamicNaming) -> None: ...
101     @property
102     def context(self) -> Context: ...
103     @context.setter
104     def context(self, cxt: Context) -> None: ...
105     @property
106     def emitter(self) -> UDPEmitter: ...
107     @emitter.setter
108     def emitter(self, value: UDPEmitter) -> None: ...
109     @property
110     def streaming(self) -> DefaultStreaming: ...
111     @streaming.setter
112     def streaming(self, value: DefaultStreaming) -> None: ...
113     @property
114     def streaming_threshold(self) -> int: ...
115     @streaming_threshold.setter
116     def streaming_threshold(self, value: int) -> None: ...
117     @property
118     def max_trace_back(self) -> int: ...
119     @max_trace_back.setter
120     def max_trace_back(self, value: int) -> None: ...
121     @property
122     def stream_sql(self) -> bool: ...
123     @stream_sql.setter
124     def stream_sql(self, value: bool) -> None: ...