Skip to content

Commit ad1c9dd

Browse files
author
xingzhaozhu
committed
minor: f format replace r
1 parent 476edae commit ad1c9dd

File tree

1 file changed

+3
-1
lines changed
  • instrumentation/opentelemetry-instrumentation-elasticsearch/src/opentelemetry/instrumentation/elasticsearch

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def _uninstrument(self, **kwargs):
157157
def _wrap_perform_request(
158158
tracer, span_name_prefix, request_hook=None, response_hook=None
159159
):
160-
# pylint: disable=R0912
160+
# pylint: disable=R0912,R0914
161161
def wrapper(wrapped, _, args, kwargs):
162162
method = url = None
163163
try:
@@ -170,8 +170,10 @@ def wrapper(wrapped, _, args, kwargs):
170170
)
171171

172172
op_name = span_name_prefix + (url or method or _DEFAULT_OP_NAME)
173+
173174
doc_id = None
174175
search_target = None
176+
175177
if url:
176178
# TODO: This regex-based solution avoids creating an unbounded number of span names, but should be replaced by instrumenting individual Elasticsearch methods instead of Transport.perform_request()
177179
# A limitation of the regex is that only the '_doc' mapping type is supported. Mapping types are deprecated since Elasticsearch 7

0 commit comments

Comments
 (0)