Skip to content

Commit ab6628b

Browse files
committed
Fix attribute setting
1 parent b3472e3 commit ab6628b

File tree

1 file changed

+3
-1
lines changed
  • opentelemetry-sdk/src/opentelemetry/sdk/trace

1 file changed

+3
-1
lines changed

opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,9 @@ def end(self, end_time: Optional[int] = None) -> None:
271271
if self.status is None:
272272
self.status = Status(canonical_code=StatusCanonicalCode.OK)
273273

274-
self.end_time = end_time if end_time is not None else time_ns()
274+
self._end_time = (
275+
end_time if end_time is not None else time_ns()
276+
)
275277

276278
if has_ended:
277279
logger.warning("Calling end() on an ended span.")

0 commit comments

Comments
 (0)