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

fix: profiling transaction timestamps #2359

Merged
merged 6 commits into from
Nov 4, 2022

Conversation

armcknight
Copy link
Member

@armcknight armcknight commented Nov 4, 2022

follows on with #2358 to fix some backend validation issues with how we're building profiles in the client. fixes #2352

The quick fix here is to simply discard transactions that end before the profiler started, and discard profiles that have no transactions associated after removing such. This will probably always be a good check to make, but we will want to try to minimize the time between transaction start and profiler start, so we can still gather shorter and shorter transactions instead of throwing them out.

@armcknight armcknight force-pushed the armcknight/fix/profiling-transaction-timestamps branch from cd1a425 to 67e3865 Compare November 4, 2022 05:43
@armcknight armcknight changed the base branch from master to armcknight/fix/profiling-transaction-thread-IDs November 4, 2022 05:43
@github-actions
Copy link

github-actions bot commented Nov 4, 2022

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1228.68 ms 1247.70 ms 19.02 ms
Size 20.50 KiB 366.78 KiB 346.27 KiB

Baseline results on branch: armcknight/fix/profiling-transaction-thread-IDs

Startup times

Revision Plain With Sentry Diff
bd08699 1241.84 ms 1265.35 ms 23.51 ms
dd74e7d 1255.92 ms 1261.12 ms 5.20 ms
19fa4ff 1227.72 ms 1242.92 ms 15.20 ms
7d757a7 1209.02 ms 1247.90 ms 38.88 ms

App size

Revision Plain With Sentry Diff
bd08699 20.50 KiB 365.50 KiB 345.00 KiB
dd74e7d 20.50 KiB 365.51 KiB 345.01 KiB
19fa4ff 20.50 KiB 365.50 KiB 345.00 KiB
7d757a7 20.50 KiB 365.51 KiB 345.01 KiB

Previous results on branch: armcknight/fix/profiling-transaction-timestamps

Startup times

Revision Plain With Sentry Diff
7142610 1262.04 ms 1273.14 ms 11.10 ms
7c0b1e9 1217.16 ms 1238.43 ms 21.27 ms
b647745 1219.42 ms 1248.86 ms 29.44 ms
ec824bd 1237.12 ms 1253.10 ms 15.98 ms

App size

Revision Plain With Sentry Diff
7142610 20.50 KiB 366.72 KiB 346.22 KiB
7c0b1e9 20.50 KiB 365.51 KiB 345.01 KiB
b647745 20.50 KiB 366.67 KiB 346.17 KiB
ec824bd 20.50 KiB 366.72 KiB 346.22 KiB

@armcknight armcknight force-pushed the armcknight/fix/profiling-transaction-timestamps branch 2 times, most recently from 89430dc to b490c3f Compare November 4, 2022 06:10
@armcknight
Copy link
Member Author

Not sure what's up with the danger failure but everything else is passing 👍🏻

@armcknight armcknight force-pushed the armcknight/fix/profiling-transaction-timestamps branch 2 times, most recently from 2280967 to b8899a7 Compare November 4, 2022 08:45
Copy link
Contributor

@brustolin brustolin left a comment

Choose a reason for hiding this comment

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

LGTM

: (unsigned long long)(
[transaction.timestamp timeIntervalSinceDate:_startDate] * 1e9)];

NSString *relativeEnd;
Copy link
Member

Choose a reason for hiding this comment

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

m: Please add some tests for this new functionality.

Copy link
Member Author

@armcknight armcknight Nov 4, 2022

Choose a reason for hiding this comment

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

Improved the test here to ensure it doesn't get the same value that will cause it to fail in backend validation: 11bc396

There was already a test that ensures a profile payload will have at least one linked transaction.

@armcknight armcknight changed the base branch from armcknight/fix/profiling-transaction-thread-IDs to master November 4, 2022 16:23
@armcknight armcknight changed the base branch from master to armcknight/fix/profiling-transaction-thread-IDs November 4, 2022 16:23
@armcknight
Copy link
Member Author

CI failures are due to code signing certificate errors, we're going to have to tackle that separately.

Base automatically changed from armcknight/fix/profiling-transaction-thread-IDs to master November 4, 2022 17:29
@armcknight armcknight force-pushed the armcknight/fix/profiling-transaction-timestamps branch from 11bc396 to d5b2da4 Compare November 4, 2022 17:30
@armcknight armcknight merged commit 059320e into master Nov 4, 2022
@armcknight armcknight deleted the armcknight/fix/profiling-transaction-timestamps branch November 4, 2022 18:04
kevinrenskers added a commit that referenced this pull request Nov 7, 2022
* master:
  test: Delete empty OOMLogicTests (#2361)
  fix: profiling transaction timestamps (#2359)
  fix: profiling transaction thread IDs (#2358)
  test: Use flush for macOS-SPM sample (#2360)
  release: 7.30.0
  fix: SentryCrash writing nan for invalid number (#2348)
  HTTP Client errors (#2308)
  ci: Call make for analyze (#2353)
  fix: CoreData tracking entity name retrieval (#2329)
  fix: sampled profile format backend validation errors (#2350)
  build(deps): bump github/codeql-action from 2.1.29 to 2.1.30 (#2351)
  build(deps): bump github/codeql-action from 2.1.28 to 2.1.29 (#2344)
  fix: Fixed flaky testTimezoneChangeNotificationBreadcrumb (#2335)

# Conflicts:
#	Sentry.xcodeproj/project.pbxproj
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.

Fix relative_end_ns in profile payloads
3 participants