Skip to content

Commit 4aa098e

Browse files
committed
fmt
1 parent 50eb5fc commit 4aa098e

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
@@ -226,10 +224,8 @@ def is_instrumentation_enabled() -> bool:
226224

227225

228226
def is_http_instrumentation_enabled() -> bool:
229-
return (
230-
is_instrumentation_enabled()
231-
and not
232-
context.get_value(_SUPPRESS_HTTP_INSTRUMENTATION_KEY)
227+
return is_instrumentation_enabled() and not context.get_value(
228+
_SUPPRESS_HTTP_INSTRUMENTATION_KEY
233229
)
234230

235231

0 commit comments

Comments
 (0)