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

feat(profiling): new options class and property; lifecycle option #4856

Draft
wants to merge 33 commits into
base: armcknight/profiling/new-continuous-apis/2-new-start-stop-api
Choose a base branch
from

Conversation

armcknight
Copy link
Member

Implementing the new option for profile session lifecycle. Includes using the new swift namespacing pattern to house these new config options.

#skip-changelog; for #4853

Copy link

github-actions bot commented Feb 15, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against ddebff1

Copy link

github-actions bot commented Feb 15, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1225.29 ms 1228.40 ms 3.10 ms
Size 22.30 KiB 826.46 KiB 804.15 KiB

Baseline results on branch: armcknight/profiling/new-continuous-apis/2-new-start-stop-api

Startup times

Revision Plain With Sentry Diff
96e7192 1206.88 ms 1235.85 ms 28.97 ms
468d437 1228.67 ms 1250.08 ms 21.41 ms
6b4657c 1215.92 ms 1236.57 ms 20.65 ms
6f57ac5 1230.02 ms 1244.73 ms 14.71 ms

App size

Revision Plain With Sentry Diff
96e7192 22.30 KiB 822.04 KiB 799.74 KiB
468d437 22.30 KiB 822.04 KiB 799.73 KiB
6b4657c 22.32 KiB 819.64 KiB 797.32 KiB
6f57ac5 22.32 KiB 819.64 KiB 797.32 KiB

Previous results on branch: armcknight/profiling/new-continuous-apis/3-profile-lifecycle-option

Startup times

Revision Plain With Sentry Diff
42612c0 1227.00 ms 1246.82 ms 19.82 ms
b301cd7 1227.17 ms 1246.08 ms 18.92 ms
0a4d742 1215.27 ms 1235.20 ms 19.93 ms

App size

Revision Plain With Sentry Diff
42612c0 22.30 KiB 824.78 KiB 802.48 KiB
b301cd7 22.32 KiB 821.01 KiB 798.70 KiB
0a4d742 22.30 KiB 824.66 KiB 802.36 KiB

@armcknight armcknight force-pushed the armcknight/profiling/new-continuous-apis/2-new-start-stop-api branch from a09d3e7 to 537c49d Compare February 18, 2025 07:04
@armcknight armcknight force-pushed the armcknight/profiling/new-continuous-apis/3-profile-lifecycle-option branch from 8128a4c to 5d43904 Compare February 18, 2025 07:05
@armcknight armcknight force-pushed the armcknight/profiling/new-continuous-apis/2-new-start-stop-api branch from 537c49d to 52a2d68 Compare March 6, 2025 23:45
@armcknight armcknight force-pushed the armcknight/profiling/new-continuous-apis/3-profile-lifecycle-option branch from 5d43904 to 3688a04 Compare March 6, 2025 23:45
@armcknight armcknight force-pushed the armcknight/profiling/new-continuous-apis/2-new-start-stop-api branch from 2990aba to d49fbd0 Compare March 7, 2025 00:19
@armcknight armcknight force-pushed the armcknight/profiling/new-continuous-apis/3-profile-lifecycle-option branch from 3688a04 to cdd216f Compare March 7, 2025 00:19
    refactor remaining profiling code in tracer to file combining
    SentryProfiledTracerConcurrency and
    SentryCaptureTransactionWithProfile, and add functions to start
    and stop continuous profiler based on root span counts
@armcknight armcknight force-pushed the armcknight/profiling/new-continuous-apis/3-profile-lifecycle-option branch from fe9d073 to 0aab22a Compare March 7, 2025 01:38
@armcknight armcknight force-pushed the armcknight/profiling/new-continuous-apis/2-new-start-stop-api branch from d49fbd0 to 11a6de0 Compare March 7, 2025 02:49
@armcknight armcknight marked this pull request as ready for review March 7, 2025 07:01
@armcknight armcknight marked this pull request as draft March 7, 2025 08:42
Copy link

codecov bot commented Mar 7, 2025

Codecov Report

Attention: Patch coverage is 82.39437% with 25 lines in your changes missing coverage. Please review.

Project coverage is 92.364%. Comparing base (bf809be) to head (f9321e2).
Report is 11 commits behind head on armcknight/profiling/new-continuous-apis/2-new-start-stop-api.

Files with missing lines Patch % Lines
Sources/Sentry/SentrySDK.m 0.000% 18 Missing ⚠️
...entry/Profiling/SentryProfiledTracerConcurrency.mm 95.495% 5 Missing ⚠️
Sources/Sentry/PrivateSentrySDKOnly.mm 0.000% 1 Missing ⚠️
...egrations/Performance/SentryProfilingOptions.swift 0.000% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                                         Coverage Diff                                         @@
##           armcknight/profiling/new-continuous-apis/2-new-start-stop-api     #4856       +/-   ##
===================================================================================================
- Coverage                                                         92.452%   92.364%   -0.088%     
===================================================================================================
  Files                                                                666       658        -8     
  Lines                                                              78326     77949      -377     
  Branches                                                           28380     27381      -999     
===================================================================================================
- Hits                                                               72414     71997      -417     
- Misses                                                              5812      5858       +46     
+ Partials                                                             100        94        -6     
Files with missing lines Coverage Δ
Sources/Sentry/SentryTracer.m 97.513% <100.000%> (-0.504%) ⬇️
Sources/Sentry/PrivateSentrySDKOnly.mm 23.902% <0.000%> (ø)
...egrations/Performance/SentryProfilingOptions.swift 0.000% <0.000%> (ø)
...entry/Profiling/SentryProfiledTracerConcurrency.mm 96.648% <95.495%> (-2.087%) ⬇️
Sources/Sentry/SentrySDK.m 84.615% <0.000%> (-4.574%) ⬇️

... and 48 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf809be...f9321e2. Read the comment docs.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

armcknight and others added 18 commits March 7, 2025 00:05
This PR reports fatal app hangs without session updates, only when the
experimental option enableAppHangTrackingV2 is enabled. Updating the
session will be done in a follow-up PR.

This fixes the first part of GH-4260.

Co-authored-by: Philip Niedertscheider <[email protected]>
This PR fixes wrongly finishing the TTFD span as the deadline exceeded
when the user calls finishSpansIfNotFinished, and the
UIViewControllerPerformanceTracker calls finishSpansIfNotFinished before
a new frame gets drawn. This happened for a customer using a
SplashScreenUIViewController. Now, the TimeToDisplayTracker finishes the
TTFD span in finishSpansIfNotFinished when the user called
finishSpansIfNotFinished.
Skip creating user interaction transactions that would time out without
any children.

Fixes GH-2407
Check in the HTTPTransport if the server returns a 200 HTTP status code.
Only if it does delete the envelope. If not, stop sending.

Fixes GH-4458
The SDK only reports watchdog terminations when the app is the
foreground. Previously, watchdog terminations events didn't have the app
context in_foreground set to true. This is fixed now.

Fixes GH-4765
…w-start-stop-api' into armcknight/git-chain/profiling/new-continuous-apis/3-profile-lifecycle-option
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.

4 participants