diff --git a/ddtrace/profiling/collector/_lock.py b/ddtrace/profiling/collector/_lock.py index ec62c5c0ee..ec0c438b2b 100644 --- a/ddtrace/profiling/collector/_lock.py +++ b/ddtrace/profiling/collector/_lock.py @@ -185,6 +185,7 @@ def _release(self, inner_func, *args, **kwargs): # _self_acquired_at is only set when the acquire was captured # if it's not set, we're not capturing the release start = self._self_acquired_at + del self._self_acquired_at try: return inner_func(*args, **kwargs) diff --git a/releasenotes/notes/profiling-lock-acquired-at-remove-c8b5b96130a46ca8.yaml b/releasenotes/notes/profiling-lock-acquired-at-remove-c8b5b96130a46ca8.yaml new file mode 100644 index 0000000000..fdb268dcd7 --- /dev/null +++ b/releasenotes/notes/profiling-lock-acquired-at-remove-c8b5b96130a46ca8.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + profiling: resolves an issue where lock release would have been captured + with a wrong acquire timestamp