Skip to content

Conversation

@stefanosiano
Copy link
Contributor

@stefanosiano stefanosiano commented Jan 7, 2025

📜 Description

ActivityLifecycleIntegration creates activity spans for all Activities, not only for appStart ones.

💡 Motivation and Context

We are currently adding onCreate and onStart spans only in the app start transaction. This PR will add these spans to all automatic transactions, too

💚 How did you test it?

Unit test

📝 Checklist

  • 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.
  • I updated the wizard 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 Jan 7, 2025

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

Generated by 🚫 dangerJS against b26179a

@stefanosiano
Copy link
Contributor Author

stefanosiano commented Jan 7, 2025

Just a note:
In the app start transaction the spans are children of app.start.cold or app.start.warm span
For other Activities the spans are direct children of the parent transaction.

Also, this works for automatic transactions only. If we want to instrument custom transactions, we can easily use Sentry.getSpan instead of the transaction reference.
Any though on this?

@stefanosiano stefanosiano changed the base branch from main to 8.x.x January 7, 2025 15:22
@stefanosiano stefanosiano changed the base branch from 8.x.x to main January 7, 2025 15:23
@stefanosiano stefanosiano marked this pull request as ready for review January 7, 2025 15:23
@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 387.53 ms 425.02 ms 37.49 ms
Size 1.58 MiB 2.21 MiB 639.85 KiB

Previous results on branch: feat/all-activity-span

Startup times

Revision Plain With Sentry Diff
2e03643 417.61 ms 438.40 ms 20.78 ms
af4d17d 438.21 ms 454.28 ms 16.07 ms

App size

Revision Plain With Sentry Diff
2e03643 1.58 MiB 2.21 MiB 639.86 KiB
af4d17d 1.70 MiB 2.36 MiB 672.76 KiB

@romtsn romtsn requested a review from lcian as a code owner February 6, 2025 00:35
@romtsn
Copy link
Member

romtsn commented Feb 6, 2025

removed "closes" because that issue was about adding onResume spans which this PR does not

@romtsn romtsn enabled auto-merge (squash) February 6, 2025 09:37
@romtsn romtsn merged commit 91474b9 into main Feb 6, 2025
34 checks passed
@romtsn romtsn deleted the feat/all-activity-span branch February 6, 2025 09:39
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.

3 participants