Skip to content

Commit 8dc6be2

Browse files
committed
fmt
1 parent 33ae64f commit 8dc6be2

File tree

1 file changed

+7
-11
lines changed
  • opentelemetry-instrumentation/src/opentelemetry/instrumentation

1 file changed

+7
-11
lines changed

opentelemetry-instrumentation/src/opentelemetry/instrumentation/utils.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@
2020
from re import escape, sub
2121
from typing import Dict, Iterable, Sequence
2222

23+
from wrapt import ObjectProxy
24+
25+
from opentelemetry import context, trace
26+
2327
# pylint: disable=E0611
2428
# FIXME: fix the importing of these private attributes when the location of the _SUPPRESS_HTTP_INSTRUMENTATION_KEY is defined.=
2529
from opentelemetry.context import (
2630
_SUPPRESS_HTTP_INSTRUMENTATION_KEY,
2731
_SUPPRESS_INSTRUMENTATION_KEY,
2832
)
29-
from wrapt import ObjectProxy
30-
31-
from opentelemetry import context, trace
3233

3334
# pylint: disable=E0611
3435
from opentelemetry.propagate import extract
@@ -197,10 +198,7 @@ def _initialize(cls):
197198
if opt_in_list:
198199
# Process http opt-in
199200
# http/dup takes priority over http
200-
if (
201-
_OpenTelemetryStabilityMode.HTTP_DUP.value
202-
in opt_in_list
203-
):
201+
if _OpenTelemetryStabilityMode.HTTP_DUP.value in opt_in_list:
204202
http_opt_in = _OpenTelemetryStabilityMode.HTTP_DUP
205203
elif _OpenTelemetryStabilityMode.HTTP.value in opt_in_list:
206204
http_opt_in = _OpenTelemetryStabilityMode.HTTP
@@ -227,10 +225,8 @@ def is_instrumentation_enabled() -> bool:
227225

228226

229227
def is_http_instrumentation_enabled() -> bool:
230-
return (
231-
is_instrumentation_enabled()
232-
and not
233-
context.get_value(_SUPPRESS_HTTP_INSTRUMENTATION_KEY)
228+
return is_instrumentation_enabled() and not context.get_value(
229+
_SUPPRESS_HTTP_INSTRUMENTATION_KEY
234230
)
235231

236232

0 commit comments

Comments
 (0)