RUM-18142: Add setAnrTriggerEnabled opt-out API for ANR-triggered profiling - #3729
RUM-18142: Add setAnrTriggerEnabled opt-out API for ANR-triggered profiling#3729ambushwork wants to merge 1 commit into
Conversation
|
@codex review |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: bd29d30 | Docs | View more details | Give us feedback! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35ed072187
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
35ed072 to
bd29d30
Compare
| fun setApplicationLaunchSampleRate(Float): Builder | ||
| fun setContinuousSampleRate(Float): Builder | ||
| fun useCustomEndpoint(String): Builder | ||
| fun setAnrTriggerEnabled(Boolean): Builder |
There was a problem hiding this comment.
maybe enableAnrTrigger to be consistent with similar APIs that enable/disable something? but probably we don't have strict consistency anyway
| synchronized(this) { | ||
| this.callback = callback | ||
| if (buildSdkVersionProvider.isAtLeastBaklava) { | ||
| if (buildSdkVersionProvider.isAtLeastBaklava && anrTriggerEnabled) { |
There was a problem hiding this comment.
are we going to consume the actual profile in another PR?
There was a problem hiding this comment.
we don't consume it until the system trace support is deployed on profiling-backend.
There was a problem hiding this comment.
Yes, but I don't think it makes sense to ship this PR alone, without consuming profile.
There was a problem hiding this comment.
Well this API currently just provides a way to opt-out the trigger registration, but indeed exposing the API might be misleading. we can put this on hold since it doesn't block any incoming development.
What does this PR do?
Adds a new
ProfilingConfiguration.Builder.setAnrTriggerEnabled(Boolean)API (default true) allowing customers to opt out ofANR-triggered profiling.
Why
ProfilingTriggerscan disable the SDK's ANR trigger to avoid cleanup conflicts.Motivation
RUM-18142
Review checklist (to be filled by reviewers)