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

Add continuous profiling ProfileLifecycle #4202

Open
wants to merge 12 commits into
base: feat/continuous-profiling-part1
Choose a base branch
from

Conversation

stefanosiano
Copy link
Member

📜 Description

Added ProfileLifecycle
Sentry.startProfileSession() will work only in MANUAL mode
Tracer start will start profiler only in TRACE mode
Tracer and spans now attach profilerId only when sampled

#skip-changelog

💡 Motivation and Context

We are adding profile lifecycle (manual | trace), as per docs

💚 How did you test it?

📝 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

…Default 0.0)

sample rate is now evaluated inside AndroidContinuousProfiler and every time a session finishes
…ry.stopProfiler with Sentry.stopProfileSession
…ry.stopProfiler with Sentry.stopProfileSession
Sentry.startProfileSession() will work only in MANUAL mode
Tracer start will start profiler only in TRACE mode
Tracer and spans now attach profilerId only when sampled
Copy link
Contributor

github-actions bot commented Feb 24, 2025

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

Generated by 🚫 dangerJS against 79742ca

@stefanosiano stefanosiano marked this pull request as ready for review February 24, 2025 12:43
Copy link
Contributor

github-actions bot commented Feb 24, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 401.65 ms 423.90 ms 22.24 ms
Size 1.65 MiB 2.32 MiB 682.68 KiB

Previous results on branch: feat/continuous-profiling-lifecycle

Startup times

Revision Plain With Sentry Diff
a8b1c40 355.38 ms 432.10 ms 76.72 ms

App size

Revision Plain With Sentry Diff
a8b1c40 1.65 MiB 2.32 MiB 682.65 KiB

Base automatically changed from feat/continuous-profiling-start-stop-rename to feat/continuous-profiling-part1 February 27, 2025 16:14
…rofiling-lifecycle

# Conflicts:
#	CHANGELOG.md
#	sentry-android-core/api/sentry-android-core.api
#	sentry-android-core/src/main/java/io/sentry/android/core/AndroidContinuousProfiler.java
#	sentry-android-core/src/main/java/io/sentry/android/core/ManifestMetadataReader.java
#	sentry-android-core/src/main/java/io/sentry/android/core/SentryPerformanceProvider.java
#	sentry-android-core/src/test/java/io/sentry/android/core/AndroidContinuousProfilerTest.kt
#	sentry-android-core/src/test/java/io/sentry/android/core/ManifestMetadataReaderTest.kt
#	sentry/api/sentry.api
#	sentry/src/main/java/io/sentry/ExperimentalOptions.java
#	sentry/src/main/java/io/sentry/IContinuousProfiler.java
#	sentry/src/main/java/io/sentry/NoOpContinuousProfiler.java
#	sentry/src/main/java/io/sentry/Scopes.java
#	sentry/src/main/java/io/sentry/SentryOptions.java
#	sentry/src/main/java/io/sentry/TracesSampler.java
#	sentry/src/test/java/io/sentry/NoOpContinuousProfilerTest.kt
#	sentry/src/test/java/io/sentry/ScopesTest.kt
#	sentry/src/test/java/io/sentry/SentryOptionsTest.kt
#	sentry/src/test/java/io/sentry/SentryTest.kt
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.

1 participant