Skip to content

Commit 6e9098e

Browse files
committed
fix: SonarQube maintainability issues.
Fixed several files for the issue **Replace the unused local variable "parent_span" with "_".** Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
1 parent eac1270 commit 6e9098e

19 files changed

Lines changed: 28 additions & 28 deletions

File tree

src/instana/instrumentation/aioamqp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ async def basic_publish_with_instana(
1818
argv: Tuple[object, Tuple[object, ...]],
1919
kwargs: Dict[str, Any],
2020
) -> object:
21-
tracer, parent_span, _ = get_tracer_tuple()
21+
tracer, _, _ = get_tracer_tuple()
2222
if not tracer:
2323
return await wrapped(*argv, **kwargs)
2424

@@ -58,7 +58,7 @@ async def basic_consume_with_instana(
5858
argv: Tuple[object, Tuple[object, ...]],
5959
kwargs: Dict[str, Any],
6060
) -> object:
61-
tracer, parent_span, _ = get_tracer_tuple()
61+
tracer, _, _ = get_tracer_tuple()
6262
if not tracer:
6363
return await wrapped(*argv, **kwargs)
6464

src/instana/instrumentation/aiohttp/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async def stan_request_start(
2727
session: "ClientSession", trace_config_ctx: SimpleNamespace, params
2828
) -> Awaitable[None]:
2929
try:
30-
tracer, parent_span, _ = get_tracer_tuple()
30+
tracer, _, _ = get_tracer_tuple()
3131
# If we're not tracing, just return
3232
if not tracer:
3333
trace_config_ctx.span_context = None

src/instana/instrumentation/aws/boto3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def make_api_call_with_instana(
6565
args: Sequence[Dict[str, Any]],
6666
kwargs: Dict[str, Any],
6767
) -> Dict[str, Any]:
68-
tracer, parent_span, _ = get_tracer_tuple()
68+
tracer, _, _ = get_tracer_tuple()
6969
# If we're not tracing, just return
7070
if not tracer:
7171
return wrapped(*args, **kwargs)

src/instana/instrumentation/aws/s3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def collect_s3_injected_attributes(
4747
args: Sequence[object],
4848
kwargs: Dict[str, Any],
4949
) -> Callable[..., object]:
50-
tracer, parent_span, _ = get_tracer_tuple()
50+
tracer, _, _ = get_tracer_tuple()
5151
# If we're not tracing, just return
5252
if not tracer:
5353
return wrapped(*args, **kwargs)

src/instana/instrumentation/cassandra.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def cb_request_error(
7373
def request_init_with_instana(
7474
fn: "ResponseFuture",
7575
) -> None:
76-
tracer, parent_span, _ = get_tracer_tuple()
76+
tracer, _, _ = get_tracer_tuple()
7777
if not tracer:
7878
return
7979

src/instana/instrumentation/celery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def before_task_publish(
145145
**kwargs: Dict[str, Any],
146146
) -> None:
147147
try:
148-
tracer, parent_span, _ = get_tracer_tuple()
148+
tracer, _, _ = get_tracer_tuple()
149149
if not tracer:
150150
return
151151

src/instana/instrumentation/couchbase.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def wrapper(
9494
args: Tuple[object, ...],
9595
kwargs: Dict[str, Any],
9696
) -> object:
97-
tracer, parent_span, _ = get_tracer_tuple()
97+
tracer, _, _ = get_tracer_tuple()
9898
# If we're not tracing, just return
9999
if not tracer:
100100
return wrapped(*args, **kwargs)
@@ -120,7 +120,7 @@ def query_with_instana(
120120
args: Tuple[object, ...],
121121
kwargs: Dict[str, Any],
122122
) -> object:
123-
tracer, parent_span, _ = get_tracer_tuple()
123+
tracer, _, _ = get_tracer_tuple()
124124
# If we're not tracing, just return
125125
if not tracer:
126126
return wrapped(*args, **kwargs)

src/instana/instrumentation/google/cloud/pubsub.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def publish_with_instana(
5050
"""References:
5151
- PublisherClient.publish(topic_path, messages, metadata)
5252
"""
53-
tracer, parent_span, _ = get_tracer_tuple()
53+
tracer, _, _ = get_tracer_tuple()
5454
# return early if we're not tracing
5555
if not tracer:
5656
return wrapped(*args, **kwargs)

src/instana/instrumentation/google/cloud/storage.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def execute_with_instana(
6262
args: Tuple[object, ...],
6363
kwargs: Dict[str, Any],
6464
) -> object:
65-
tracer, parent_span, _ = get_tracer_tuple()
65+
tracer, _, _ = get_tracer_tuple()
6666

6767
# batch requests are traced with finish_batch_with_instana()
6868
# also return early if we're not tracing
@@ -94,7 +94,7 @@ def download_with_instana(
9494
args: Tuple[object, ...],
9595
kwargs: Dict[str, Any],
9696
) -> object:
97-
tracer, parent_span, _ = get_tracer_tuple()
97+
tracer, _, _ = get_tracer_tuple()
9898
# return early if we're not tracing
9999
if not tracer:
100100
return wrapped(*args, **kwargs)
@@ -130,7 +130,7 @@ def upload_with_instana(
130130
args: Tuple[object, ...],
131131
kwargs: Dict[str, Any],
132132
) -> object:
133-
tracer, parent_span, _ = get_tracer_tuple()
133+
tracer, _, _ = get_tracer_tuple()
134134
# return early if we're not tracing
135135
if not tracer:
136136
return wrapped(*args, **kwargs)
@@ -155,7 +155,7 @@ def finish_batch_with_instana(
155155
args: Tuple[object, ...],
156156
kwargs: Dict[str, Any],
157157
) -> object:
158-
tracer, parent_span, _ = get_tracer_tuple()
158+
tracer, _, _ = get_tracer_tuple()
159159
# return early if we're not tracing
160160
if not tracer:
161161
return wrapped(*args, **kwargs)

src/instana/instrumentation/httpx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def handle_request_with_instana(
7070
args: Tuple[int, str, Tuple[Any, ...]],
7171
kwargs: Dict[str, Any],
7272
) -> httpx.Response:
73-
tracer, parent_span, _ = get_tracer_tuple()
73+
tracer, _, _ = get_tracer_tuple()
7474
# If we're not tracing, just return
7575
if not tracer:
7676
return wrapped(*args, **kwargs)
@@ -99,7 +99,7 @@ async def handle_async_request_with_instana(
9999
args: Tuple[int, str, Tuple[Any, ...]],
100100
kwargs: Dict[str, Any],
101101
) -> httpx.Response:
102-
tracer, parent_span, _ = get_tracer_tuple()
102+
tracer, _, _ = get_tracer_tuple()
103103
# If we're not tracing, just return
104104
if not tracer:
105105
return await wrapped(*args, **kwargs)

0 commit comments

Comments
 (0)