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