Skip to content

Commit e53ef3b

Browse files
committed
fix: resolve ruff linting errors after merge
- Add missing `Instrument` import in botocore __init__.py - Fix PLC0207 string split in boto3sqs __init__.py
1 parent dfab3bc commit e53ef3b

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

  • instrumentation
    • opentelemetry-instrumentation-boto3sqs/src/opentelemetry/instrumentation/boto3sqs
    • opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def _safe_end_processing_span(receipt_handle: str) -> None:
187187
@staticmethod
188188
def _extract_queue_name_from_url(queue_url: str) -> str:
189189
# A Queue name cannot have the `/` char, therefore we can return the part after the last /
190-
return queue_url.split("/")[-1]
190+
return queue_url.rsplit("/", maxsplit=1)[-1]
191191

192192
def _create_processing_span(
193193
self,

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ def response_hook(span, service_name, operation_name, result):
151151
suppress_http_instrumentation,
152152
unwrap,
153153
)
154+
from opentelemetry.metrics import Instrument
154155
from opentelemetry.propagators.aws.aws_xray_propagator import (
155156
TRACE_HEADER_KEY,
156157
AwsXRayPropagator,

0 commit comments

Comments
 (0)