File tree 10 files changed +9
-25
lines changed
opentelemetry-api/src/opentelemetry
opentelemetry-distro/src/opentelemetry/distro
opentelemetry-instrumentation
src/opentelemetry/instrumentation/auto_instrumentation
10 files changed +9
-25
lines changed Original file line number Diff line number Diff line change 11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
- # pylint: disable=no-name-in-module
15
14
16
15
import logging
17
16
import threading
23
22
from pkg_resources import iter_entry_points
24
23
25
24
from opentelemetry .context .context import Context , _RuntimeContext
26
- from opentelemetry .environment_variables import ( # type: ignore
27
- OTEL_PYTHON_CONTEXT ,
28
- )
25
+ from opentelemetry .environment_variables import OTEL_PYTHON_CONTEXT
29
26
30
27
logger = logging .getLogger (__name__ )
31
28
_RUNTIME_CONTEXT = None # type: typing.Optional[_RuntimeContext]
@@ -55,7 +52,7 @@ def wrapper( # type: ignore[misc]
55
52
default_context = "contextvars_context"
56
53
57
54
configured_context = environ .get (
58
- OTEL_PYTHON_CONTEXT , default_context # type: ignore
55
+ OTEL_PYTHON_CONTEXT , default_context
59
56
) # type: str
60
57
try :
61
58
_RUNTIME_CONTEXT = next (
Original file line number Diff line number Diff line change 11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
- # pylint: disable=no-name-in-module
15
14
16
15
"""
17
16
API for propagation of context.
@@ -76,9 +75,7 @@ def example_route():
76
75
from pkg_resources import iter_entry_points
77
76
78
77
from opentelemetry .context .context import Context
79
- from opentelemetry .environment_variables import ( # type: ignore
80
- OTEL_PROPAGATORS ,
81
- )
78
+ from opentelemetry .environment_variables import OTEL_PROPAGATORS
82
79
from opentelemetry .propagators import composite , textmap
83
80
84
81
logger = getLogger (__name__ )
@@ -130,7 +127,7 @@ def inject(
130
127
131
128
# Single use variable here to hack black and make lint pass
132
129
environ_propagators = environ .get (
133
- OTEL_PROPAGATORS , # type: ignore
130
+ OTEL_PROPAGATORS ,
134
131
"tracecontext,baggage" ,
135
132
)
136
133
Original file line number Diff line number Diff line change 11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
- # pylint: disable=no-name-in-module
15
14
16
15
"""
17
16
The OpenTelemetry tracing API describes the classes used to generate
85
84
from opentelemetry import context as context_api
86
85
from opentelemetry .attributes import BoundedAttributes # type: ignore
87
86
from opentelemetry .context .context import Context
88
- from opentelemetry .environment_variables import ( # type: ignore
89
- OTEL_PYTHON_TRACER_PROVIDER ,
90
- )
87
+ from opentelemetry .environment_variables import OTEL_PYTHON_TRACER_PROVIDER
91
88
from opentelemetry .trace .propagation import (
92
89
_SPAN_KEY ,
93
90
get_current_span ,
@@ -496,7 +493,7 @@ def get_tracer_provider() -> TracerProvider:
496
493
497
494
_TRACER_PROVIDER = cast ( # type: ignore
498
495
"TracerProvider" ,
499
- _load_provider (OTEL_PYTHON_TRACER_PROVIDER , "tracer_provider" ), # type: ignore
496
+ _load_provider (OTEL_PYTHON_TRACER_PROVIDER , "tracer_provider" ),
500
497
)
501
498
return _TRACER_PROVIDER
502
499
Original file line number Diff line number Diff line change 11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
- # pylint: disable=no-name-in-module
15
14
16
15
import os
17
16
Original file line number Diff line number Diff line change 13
13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
14
# See the License for the specific language governing permissions and
15
15
# limitations under the License.
16
- # pylint: disable=no-name-in-module
17
16
18
17
from argparse import REMAINDER , ArgumentParser
19
18
from logging import getLogger
Original file line number Diff line number Diff line change 11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
- # pylint: disable=no-name-in-module
15
14
16
15
import sys
17
16
from logging import getLogger
21
20
22
21
from pkg_resources import iter_entry_points
23
22
24
- from opentelemetry .environment_variables import (
25
- OTEL_PYTHON_DISABLED_INSTRUMENTATIONS ,
26
- )
27
23
from opentelemetry .instrumentation .dependencies import (
28
24
get_dist_dependency_conflicts ,
29
25
)
30
26
from opentelemetry .instrumentation .distro import BaseDistro , DefaultDistro
27
+ from opentelemetry .instrumentation .environment_variables import (
28
+ OTEL_PYTHON_DISABLED_INSTRUMENTATIONS ,
29
+ )
31
30
32
31
logger = getLogger (__file__ )
33
32
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
# type: ignore
15
- # pylint: disable=no-name-in-module
16
15
17
16
from unittest import TestCase
18
17
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
# type: ignore
15
- # pylint: disable=no-name-in-module
16
15
17
16
from os import environ , getcwd
18
17
from os .path import abspath , dirname , pathsep
Original file line number Diff line number Diff line change 11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
- # pylint: disable=no-name-in-module
15
14
16
15
from os import environ
17
16
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
# type: ignore
15
- # pylint: disable=no-name-in-module
16
15
17
16
from os import environ
18
17
from unittest import TestCase
You can’t perform that action at this time.
0 commit comments