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

Enrich database spans with blocked main thread info #2760

Merged
merged 3 commits into from
Jun 2, 2023

Conversation

markushi
Copy link
Member

@markushi markushi commented Jun 1, 2023

📜 Description

Extends the instrumented spans with main thread information. If the query executes on the main thread, a stack trace is added as well. Based on

final boolean isMainThread = options.getMainThreadChecker().isMainThread();
currentSpan.setData("blocked_main_thread", isMainThread);
if (isMainThread) {
currentSpan.setData("call_stack", stackTraceFactory.getInAppCallStack());
}

💡 Motivation and Context

We want to have database on main thread issues.

💚 How did you test it?

📝 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

@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2023

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

Generated by 🚫 dangerJS against b29c9c7

@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 286.28 ms 355.61 ms 69.33 ms
Size 1.72 MiB 2.28 MiB 571.59 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
16cd2b6 243.02 ms 349.69 ms 106.67 ms
46b1782 387.72 ms 458.74 ms 71.02 ms
1707044 338.80 ms 384.79 ms 46.00 ms

App size

Revision Plain With Sentry Diff
16cd2b6 1.72 MiB 2.28 MiB 570.95 KiB
46b1782 1.72 MiB 2.28 MiB 570.44 KiB
1707044 1.72 MiB 2.28 MiB 570.44 KiB

Previous results on branch: feat/database-on-main-thread-spans

Startup times

Revision Plain With Sentry Diff
79f8a72 280.36 ms 345.35 ms 64.99 ms

App size

Revision Plain With Sentry Diff
79f8a72 1.72 MiB 2.28 MiB 571.62 KiB

@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01 ⚠️

Comparison is base (4966d7f) 81.10% compared to head (e080b0c) 81.09%.

❗ Current head e080b0c differs from pull request most recent head b29c9c7. Consider uploading reports for the commit b29c9c7 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2760      +/-   ##
============================================
- Coverage     81.10%   81.09%   -0.01%     
+ Complexity     4472     4470       -2     
============================================
  Files           347      347              
  Lines         16482    16475       -7     
  Branches       2233     2232       -1     
============================================
- Hits          13367    13361       -6     
+ Misses         2182     2181       -1     
  Partials        933      933              

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@markushi markushi enabled auto-merge (squash) June 2, 2023 08:07
@markushi markushi merged commit ff49977 into main Jun 2, 2023
15 of 17 checks passed
@markushi markushi deleted the feat/database-on-main-thread-spans branch June 2, 2023 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants