Skip to content

Commit fd95d8a

Browse files
[Backport 8.15] Fix _otel lint (#2655)
(cherry picked from commit ac64e9f) Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
1 parent 780ea82 commit fd95d8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

elasticsearch/_otel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ def helpers_span(self, span_name: str) -> Generator[OpenTelemetrySpan, None, Non
9898
otel_span.set_attribute("db.operation", span_name)
9999
# Without a request method, Elastic APM does not display the traces
100100
otel_span.set_attribute("http.request.method", "null")
101-
yield otel_span
101+
yield OpenTelemetrySpan(otel_span)
102102

103103
@contextlib.contextmanager
104104
def use_span(self, span: OpenTelemetrySpan) -> Generator[None, None, None]:
105105
if not self.enabled or self.tracer is None:
106106
yield
107107
return
108108

109-
with trace.use_span(span):
109+
with trace.use_span(span.otel_span):
110110
yield

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy