-
-
Notifications
You must be signed in to change notification settings - Fork 456
Support ProfileLifecycle.TRACE #4576
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
base: feat/poc-continuous-profiling
Are you sure you want to change the base?
Support ProfileLifecycle.TRACE #4576
Conversation
…TRACE is used to have the profile ID when SentryTracer is created
…ingBoot autoconfig
…and make fields private
…the interval separately, this seems to work better and create more samples
…is not configured
Instructions and example for changelogPlease add an entry to 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 |
Performance metrics 🚀
|
…entry-java into feat/continuous-profiling-02
@sentry review |
cursor review |
String profileLifecycleString = propertiesProvider.getProperty("profile-lifecycle"); | ||
if (profileLifecycleString != null && !profileLifecycleString.isEmpty()) { | ||
options.setProfileLifecycle(ProfileLifecycle.valueOf(profileLifecycleString.toUpperCase())); | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
📜 Description
ProfileChunk
💡 Motivation and Context
Follow-Up to #4556
💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps