1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# *****************************************************************************
# * AUTO-GENERATED CODE *
# * *
# * This code was generated by the `pyo3-tracing-subscriber` crate. Any *
# * modifications to this file should be made to the script or the generation *
# * process that produced this code. Specifically, see: *
# * `pyo3_tracing_subscriber::stubs::write_stub_files` *
# * *
# * Do not manually edit this file, as your changes may be overwritten the *
# * next time the code is generated. *
# *****************************************************************************
"""
Raised if the initialization, enter, and exit of the tracing context manager was
invoked in an invalid order.
"""
...
"""
Raised if the tracing subscriber configuration is invalid or if a background export task
fails to start.
"""
...
"""
Raised if the tracing subscriber fails to shutdown cleanly.
"""
...
"""
Configuration for exporting spans in batch. This will require a background task to be spawned
and run for the duration of the tracing context manager.
This configuration is typically favorable unless the tracing context manager is short lived.
"""
...
"""
Configuration for exporting spans in a simple manner. This does not spawn a background task
unless it is required by the configured export layer. Generally favor `BatchConfig` instead,
unless the tracing context manager is short lived.
Note, some export layers still spawn a background task even when `SimpleConfig` is used.
This is the case for the OTLP export layer, which makes gRPC export requests within the
background Tokio runtime.
"""
...
"""
This tracing configuration will export spans emitted only on the current thread. A `Tracing` context
manager may be initialized multiple times for the same process with this configuration (although
they should not be nested).
Note, this configuration is currently incompatible with async methods defined with `pyo3_asyncio`.
"""
...
"""
This tracing configuration will export spans emitted on any thread in the current process. Because
it sets a tracing subscriber at the global level, it can only be initialized once per process.
This is typically favorable, as it only requires a single initialization across your entire Python
application.
"""
...
"""
A context manager that initializes a tracing subscriber and exports spans
emitted from within the parent Rust-Python package. It may be used synchonously
or asynchronously.
Each instance of this context manager can only be used once and only once.
"""
...
...
...
...
...
=
"""
One of `BatchConfig` or `SimpleConfig`.
"""
=
"""
One of `CurrentThreadTracingConfig` or `GlobalTracingConfig`.
"""