Skip to content

Conversation

lbloder
Copy link
Collaborator

@lbloder lbloder commented Jul 29, 2025

📜 Description

  • Support ProfileLifecycle.TRACE with Sentry Tracing as well as OpenTelemetry
  • Improve timestamp calculation
  • Use improved command to start async profiler
  • Enum for Platform in ProfileChunk
  • Fix most comments from Feat/poc continuous profiling #4556

💡 Motivation and Context

Follow-Up to #4556

💚 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

Copy link
Contributor

github-actions bot commented Jul 29, 2025

Fails
🚫 Please consider adding a changelog entry for the next release.
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- Support ProfileLifecycle.TRACE ([#4576](https://github.com/getsentry/sentry-java/pull/4576))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against 8b7e489

Copy link
Contributor

github-actions bot commented Jul 29, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 439.92 ms 478.18 ms 38.26 ms
Size 1.58 MiB 2.09 MiB 521.13 KiB

Baseline results on branch: feat/poc-continuous-profiling

Startup times

Revision Plain With Sentry Diff
d53675e 447.81 ms 457.62 ms 9.80 ms

App size

Revision Plain With Sentry Diff
d53675e 1.58 MiB 2.09 MiB 520.14 KiB

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

Startup times

Revision Plain With Sentry Diff
ac08652 442.71 ms 446.19 ms 3.48 ms
c21fbdb 420.29 ms 449.88 ms 29.59 ms

App size

Revision Plain With Sentry Diff
ac08652 1.58 MiB 2.09 MiB 521.13 KiB
c21fbdb 1.58 MiB 2.09 MiB 521.13 KiB

@lbloder lbloder mentioned this pull request Aug 4, 2025
9 tasks
@adinauer
Copy link
Member

adinauer commented Aug 4, 2025

@sentry review

@lbloder lbloder marked this pull request as ready for review August 4, 2025 08:57
@lbloder lbloder requested a review from adinauer as a code owner August 4, 2025 08:57
@adinauer
Copy link
Member

adinauer commented Aug 4, 2025

cursor review

String profileLifecycleString = propertiesProvider.getProperty("profile-lifecycle");
if (profileLifecycleString != null && !profileLifecycleString.isEmpty()) {
options.setProfileLifecycle(ProfileLifecycle.valueOf(profileLifecycleString.toUpperCase()));
}
Copy link

Choose a reason for hiding this comment

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

Bug: Profile Lifecycle Parsing Error Handling

Missing error handling when parsing the profile-lifecycle property. If an invalid string value is provided, ProfileLifecycle.valueOf(profileLifecycleString.toUpperCase()) throws an IllegalArgumentException, causing the application to crash during initialization. Error handling should be added to prevent crashes, log a warning, and optionally fall back to a default value.

Fix in Cursor Fix in Web

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@adinauer WDYT, what should we do here. catch and ignore the exception if an unsupported value is present? That is basically what we do in getDoubleProperty in the ExternalOptions as well if its not a number we just set it to null

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