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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timestamp when a profile starts #3442

Merged
merged 3 commits into from
Jun 18, 2024
Merged

Conversation

stefanosiano
Copy link
Member

@stefanosiano stefanosiano commented May 24, 2024

馃摐 Description

added start timestamp in ProfileStartData when a profile starts
added the timestamp in ProfilingTraceData and send it in the json payload

Example of wrong profile (before)
Example of correct profile (after)

馃挕 Motivation and Context

Profiles are a not aligned to spans, especially when we change the transaction start timestamp. In that case, it is assumed that the profile and the transaction starts at the same time, which is wrong. I added a timestamp field set when the profile starts.

馃挌 How did you test it?

Unit tests

馃摑 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

馃敭 Next steps

added the timestamp in ProfilingTraceData and send it in the json payload
@stefanosiano stefanosiano changed the title added start timestamp in ProfileStartData when a profile starts Add timestamp when a profile starts May 24, 2024
@stefanosiano
Copy link
Member Author

It looks like there is something wrong, as changes are not reflected in the flamechart in Sentry. I'll keep it as a draft until further investigation.

Copy link
Contributor

github-actions bot commented May 24, 2024

Performance metrics 馃殌

Plain With Sentry Diff
Startup time 375.77 ms 473.78 ms 98.01 ms
Size 1.70 MiB 2.28 MiB 592.46 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
d6d2b2e 463.14 ms 545.56 ms 82.42 ms
a3c77bc 375.80 ms 445.85 ms 70.06 ms
c7e2fbc 377.85 ms 426.35 ms 48.50 ms
f5e1b97 362.53 ms 429.31 ms 66.78 ms
7eccfdb 389.94 ms 461.29 ms 71.35 ms
f1fdb9f 404.21 ms 496.87 ms 92.66 ms
28c9a83 346.14 ms 377.76 ms 31.62 ms
baaf637 375.71 ms 441.58 ms 65.87 ms
283d83e 348.44 ms 392.06 ms 43.62 ms
61981dc 388.65 ms 454.96 ms 66.31 ms

App size

Revision Plain With Sentry Diff
d6d2b2e 1.72 MiB 2.27 MiB 555.05 KiB
a3c77bc 1.72 MiB 2.29 MiB 577.53 KiB
c7e2fbc 1.72 MiB 2.29 MiB 576.40 KiB
f5e1b97 1.70 MiB 2.28 MiB 592.00 KiB
7eccfdb 1.72 MiB 2.27 MiB 556.93 KiB
f1fdb9f 1.70 MiB 2.28 MiB 592.08 KiB
28c9a83 1.70 MiB 2.28 MiB 592.00 KiB
baaf637 1.72 MiB 2.27 MiB 558.42 KiB
283d83e 1.72 MiB 2.29 MiB 577.69 KiB
61981dc 1.70 MiB 2.28 MiB 592.12 KiB

Previous results on branch: fix/profile-timestamp

Startup times

Revision Plain With Sentry Diff
b0b7f9f 374.96 ms 450.06 ms 75.10 ms

App size

Revision Plain With Sentry Diff
b0b7f9f 1.70 MiB 2.28 MiB 592.26 KiB

@stefanosiano stefanosiano marked this pull request as ready for review June 4, 2024 12:56
@stefanosiano
Copy link
Member Author

frontend was updated, and now everything works as expected

Copy link
Member

@markushi markushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@stefanosiano stefanosiano merged commit c17f259 into main Jun 18, 2024
25 checks passed
@stefanosiano stefanosiano deleted the fix/profile-timestamp branch June 18, 2024 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants