Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

Zylphrex
Copy link
Member

@Zylphrex Zylphrex commented Feb 13, 2023

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.
sentry_sdk/utils.py Outdated Show resolved Hide resolved
@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