Skip to content

Commit 2ed1461

Browse files
author
Filip Nikolovski
committed
run ruff
1 parent aa54865 commit 2ed1461

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,13 @@ def response_hook(span, req, resp):
194194
import opentelemetry.instrumentation.wsgi as otel_wsgi
195195
from opentelemetry import context, trace
196196
from opentelemetry.instrumentation._semconv import (
197+
_get_schema_url,
197198
_HTTPStabilityMode,
198199
_OpenTelemetrySemanticConventionStability,
199200
_OpenTelemetryStabilitySignalType,
200201
_report_new,
201202
_report_old,
202203
_set_status,
203-
_get_schema_url,
204204
)
205205
from opentelemetry.instrumentation.falcon.package import _instruments
206206
from opentelemetry.instrumentation.falcon.version import __version__
@@ -372,9 +372,13 @@ def __call__(self, env, start_response):
372372
context_carrier=env,
373373
context_getter=otel_wsgi.wsgi_getter,
374374
)
375-
attributes = otel_wsgi.collect_request_attributes(env, self._sem_conv_opt_in_mode)
375+
attributes = otel_wsgi.collect_request_attributes(
376+
env, self._sem_conv_opt_in_mode
377+
)
376378
active_requests_count_attrs = (
377-
otel_wsgi._parse_active_request_count_attrs(attributes, self._sem_conv_opt_in_mode)
379+
otel_wsgi._parse_active_request_count_attrs(
380+
attributes, self._sem_conv_opt_in_mode
381+
)
378382
)
379383
self.active_requests_counter.add(1, active_requests_count_attrs)
380384

instrumentation/opentelemetry-instrumentation-falcon/tests/test_falcon.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
#
15-
from timeit import default_timer
1615
from unittest.mock import Mock, patch
1716

1817
import pytest
@@ -225,9 +224,7 @@ def _test_method(self, method, old_semconv=True, new_semconv=False):
225224
if new_semconv:
226225
expected_attributes.update(expected_attributes_new)
227226

228-
self.assertSpanHasAttributes(
229-
span, expected_attributes
230-
)
227+
self.assertSpanHasAttributes(span, expected_attributes)
231228
# In falcon<3, NET_PEER_IP is always set by default to 127.0.0.1
232229
# In falcon>3, NET_PEER_IP is not set to anything by default to
233230
# https://github.com/falconry/falcon/blob/5233d0abed977d9dab78ebadf305f5abe2eef07c/falcon/testing/helpers.py#L1168-L1172 # noqa

0 commit comments

Comments
 (0)