Skip to content

ref(profiling): Use the transaction timestamps to anchor the profile#1898

Merged
Zylphrex merged 12 commits into
masterfrom
txiao/ref/use-the-transaction-timestamps-to-anchor-the-profile
Feb 15, 2023
Merged

ref(profiling): Use the transaction timestamps to anchor the profile#1898
Zylphrex merged 12 commits into
masterfrom
txiao/ref/use-the-transaction-timestamps-to-anchor-the-profile

Conversation

@Zylphrex

@Zylphrex Zylphrex commented Feb 13, 2023

Copy link
Copy Markdown
Member

We want the profile to be as closely aligned with the transaction's timestamps as possible to make aligning the two visualizations as accurate as possible. Here we change the transaction's internal _start_timestamp_monotonic to be in nanoseconds derived from each of the possible clocks we use in the various python versions. This allows us to use the start_timestamp of the transaction as the timestamp of the profile, and we can use the _start_timestamp_monontonic as the anchor for all the relative timestamps in the profile.

We want the profile to be as closely aligned with the transaction's timestamps
as possible to make aligning the two visualizations as accurate as possible.
Here we change the transaction's internal `_start_timestamp_monotonic` to
contain an unit for each of the possible clocks we use in the various python
versions. This allows us to use the `start_timestamp` of the transaction as the
timestamp of the profile, and we can use the `_start_timestamp_monontonic` as
the anchor for all the relative timestamps in the profile.
Comment thread sentry_sdk/utils.py Outdated
@Zylphrex
Zylphrex marked this pull request as ready for review February 14, 2023 20:31
…profile' of github.com:getsentry/sentry-python into txiao/ref/use-the-transaction-timestamps-to-anchor-the-profile
@Zylphrex
Zylphrex merged commit 0b489c6 into master Feb 15, 2023
@Zylphrex
Zylphrex deleted the txiao/ref/use-the-transaction-timestamps-to-anchor-the-profile branch February 15, 2023 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants