diff --git a/instrumentation/opentelemetry-instrumentation-aws-lambda/src/opentelemetry/instrumentation/aws_lambda/__init__.py b/instrumentation/opentelemetry-instrumentation-aws-lambda/src/opentelemetry/instrumentation/aws_lambda/__init__.py index 11769c729d..35dcec9491 100644 --- a/instrumentation/opentelemetry-instrumentation-aws-lambda/src/opentelemetry/instrumentation/aws_lambda/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-aws-lambda/src/opentelemetry/instrumentation/aws_lambda/__init__.py @@ -287,9 +287,12 @@ def _instrumented_lambda_handler_call( span_kind = None try: - if lambda_event["Records"][0]["eventSource"] in set( - ["aws:sqs", "aws:s3", "aws:sns", "aws:dynamodb"] - ): + if lambda_event["Records"][0]["eventSource"] in { + "aws:sqs", + "aws:s3", + "aws:sns", + "aws:dynamodb", + }: # See more: # https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html # https://docs.aws.amazon.com/lambda/latest/dg/with-sns.html diff --git a/instrumentation/opentelemetry-instrumentation-boto/src/opentelemetry/instrumentation/boto/__init__.py b/instrumentation/opentelemetry-instrumentation-boto/src/opentelemetry/instrumentation/boto/__init__.py index b94cc744b3..9f48d2c636 100644 --- a/instrumentation/opentelemetry-instrumentation-boto/src/opentelemetry/instrumentation/boto/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-boto/src/opentelemetry/instrumentation/boto/__init__.py @@ -178,8 +178,6 @@ def _patched_query_request(self, original_func, instance, args, kwargs): ) def _patched_auth_request(self, original_func, instance, args, kwargs): - operation_name = None - frame = currentframe().f_back operation_name = None while frame: diff --git a/instrumentation/opentelemetry-instrumentation-elasticsearch/src/opentelemetry/instrumentation/elasticsearch/__init__.py b/instrumentation/opentelemetry-instrumentation-elasticsearch/src/opentelemetry/instrumentation/elasticsearch/__init__.py index a2c434c6cc..3b2767e272 100644 --- a/instrumentation/opentelemetry-instrumentation-elasticsearch/src/opentelemetry/instrumentation/elasticsearch/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-elasticsearch/src/opentelemetry/instrumentation/elasticsearch/__init__.py @@ -130,7 +130,7 @@ def instrumentation_dependencies(self) -> Collection[str]: def _instrument(self, **kwargs): """ - Instruments elasticsearch module + Instruments Elasticsearch module """ tracer_provider = kwargs.get("tracer_provider") tracer = get_tracer(__name__, __version__, tracer_provider) diff --git a/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py b/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py index 6cb39c7e2c..45da04985d 100644 --- a/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py @@ -266,7 +266,6 @@ def response_hook(span: Span, status: str, response_headers: List): def get_default_span_name(): - span_name = "" try: span_name = flask.request.url_rule.rule except AttributeError: diff --git a/instrumentation/opentelemetry-instrumentation-pymongo/src/opentelemetry/instrumentation/pymongo/__init__.py b/instrumentation/opentelemetry-instrumentation-pymongo/src/opentelemetry/instrumentation/pymongo/__init__.py index 91cd81aab3..4e9ae8a14b 100644 --- a/instrumentation/opentelemetry-instrumentation-pymongo/src/opentelemetry/instrumentation/pymongo/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-pymongo/src/opentelemetry/instrumentation/pymongo/__init__.py @@ -194,7 +194,7 @@ def _pop_span(self, event): def _get_span_dict_key(event): if event.connection_id is not None: - return (event.request_id, event.connection_id) + return event.request_id, event.connection_id return event.request_id diff --git a/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/__init__.py b/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/__init__.py index 1b0b714fa8..b85c2336b0 100644 --- a/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/__init__.py @@ -142,7 +142,6 @@ def _instrument( ): def _traced_execute_command(func, instance, args, kwargs): query = _format_command_args(args) - name = "" if len(args) > 0 and args[0]: name = args[0] else: diff --git a/instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/__init__.py b/instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/__init__.py index 420bad5d66..413c61ba8f 100644 --- a/instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/__init__.py @@ -78,7 +78,7 @@ import psutil -# FIXME Remove this pyling disabling line when Github issue is cleared +# FIXME Remove this pylint disabling line when Github issue is cleared # pylint: disable=no-name-in-module from opentelemetry.instrumentation.instrumentor import BaseInstrumentor from opentelemetry.instrumentation.system_metrics.package import _instruments