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

Change payload for Continuous Profiling v8 (p2) #3711

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

Conversation

stefanosiano
Copy link
Member

@stefanosiano stefanosiano commented Sep 23, 2024

📜 Description

added profile_chunk envelope create
added IHub.captureProfileChunk and ISentryClient.captureProfileChunk
added profilerId and chunkId reset logic to AndroidContinuousProfiler
added absolute timestamps to ProfileMeasurementValue
added ProfileContext to Contexts

#skip-changelog

💡 Motivation and Context

Implements payload changes for Continuous Profiling
Part 2 of #3710

💚 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

added IHub.captureProfileChunk and ISentryClient.captureProfileChunk
added profilerId and chunkId reset logic to AndroidContinuousProfiler
added absolute timestamps to ProfileMeasurementValue
added ProfileContext to Contexts
Copy link
Contributor

github-actions bot commented Sep 23, 2024

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

Generated by 🚫 dangerJS against 3c9a35a

Copy link
Contributor

github-actions bot commented Sep 23, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 425.02 ms 452.80 ms 27.78 ms
Size 1.65 MiB 2.31 MiB 674.06 KiB

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

Startup times

Revision Plain With Sentry Diff
ae2da55 448.49 ms 482.66 ms 34.17 ms

App size

Revision Plain With Sentry Diff
ae2da55 1.65 MiB 2.31 MiB 674.06 KiB

…ta, now it uses timestamp.nanotime() to achieve same result

profiler resets chunk id and profiler id in case profile is not recorded due to an error
…rofiling-part2

# Conflicts:
#	sentry-android-core/src/main/java/io/sentry/android/core/AndroidContinuousProfiler.java
#	sentry-android-core/src/main/java/io/sentry/android/core/AndroidProfiler.java
#	sentry/api/sentry.api
#	sentry/src/main/java/io/sentry/HubAdapter.java
#	sentry/src/test/java/io/sentry/protocol/ContextsTest.kt
options
.getExecutorService()
.submit(
() -> {
Copy link
Member

Choose a reason for hiding this comment

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

oh, one more thing I forgot - we should probably have a AtomicBoolean isClosed value that we set in close() and check here to prevent sending chunks when the sdk is closing, wdyt?

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, i'll do it in a followup pr

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.

2 participants