Skip to content

Commit d94652a

Browse files
committed
removed accidental stuff
1 parent 2e37b51 commit d94652a

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

sentry_sdk/tracing.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -708,19 +708,10 @@ def finish(self, scope=None, end_timestamp=None):
708708
end_timestamp = datetime.fromtimestamp(end_timestamp, timezone.utc)
709709
self.timestamp = end_timestamp
710710
else:
711-
print(f"In Span.finish for span {self}")
712-
now = nanosecond_time()
713-
elapsed = now - self._start_timestamp_monotonic_ns
714-
print(f"NOW before assigment: {now}")
715-
self.timestamp = (
716-
self.start_timestamp
717-
+ timedelta( # The assignment in this line is taking a lot of time
718-
microseconds=elapsed / 1000
719-
)
711+
elapsed = nanosecond_time() - self._start_timestamp_monotonic_ns
712+
self.timestamp = self.start_timestamp + timedelta(
713+
microseconds=elapsed / 1000
720714
)
721-
now2 = nanosecond_time()
722-
print(f"NOW2 after assigment: {now2}")
723-
print(f"Assignment duration: {now2 - now}")
724715
except AttributeError:
725716
self.timestamp = datetime.now(timezone.utc)
726717

0 commit comments

Comments
 (0)