mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-29 21:23:55 +08:00
Fix lint
This commit is contained in:
@ -85,8 +85,7 @@ class ElasticsearchInstrumentor(BaseInstrumentor):
|
||||
def __init__(self, span_name_prefix=None):
|
||||
if not span_name_prefix:
|
||||
span_name_prefix = environ.get(
|
||||
"OTEL_PYTHON_ELASTICSEARCH_NAME_PREFIX",
|
||||
"Elasticsearch",
|
||||
"OTEL_PYTHON_ELASTICSEARCH_NAME_PREFIX", "Elasticsearch",
|
||||
)
|
||||
self._span_name_prefix = span_name_prefix.strip()
|
||||
super().__init__()
|
||||
@ -125,8 +124,7 @@ def _wrap_perform_request(tracer, span_name_prefix):
|
||||
body = kwargs.get("body", None)
|
||||
|
||||
with tracer.start_as_current_span(
|
||||
op_name,
|
||||
kind=SpanKind.CLIENT,
|
||||
op_name, kind=SpanKind.CLIENT,
|
||||
) as span:
|
||||
if span.is_recording():
|
||||
attributes = {
|
||||
|
Reference in New Issue
Block a user