Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fd95d8a

Browse filesBrowse 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
Copy full SHA for fd95d8a

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎elasticsearch/_otel.py

Copy file name to clipboardExpand all lines: elasticsearch/_otel.py
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.