RUM-9958: Align datadog initialization with ios for benchmark app#2647
Merged
aleksandr-gringauz merged 2 commits intoMay 14, 2025
Conversation
aleksandr-gringauz
force-pushed
the
aleksandr-gringauz/RUM-9958/align-datadog-init-with-ios-for-benchmarks
branch
from
May 14, 2025 11:42
4df6a7a to
c500f7d
Compare
aleksandr-gringauz
marked this pull request as ready for review
May 14, 2025 11:53
0xnm
previously approved these changes
May 14, 2025
Comment on lines
+98
to
+100
| return when (isInstrumentedRun(config)) { | ||
| true -> isSessionReplayScenario(config) || isRumScenario(config) | ||
| false -> isSessionReplayScenario(config) | ||
| false -> false |
Member
There was a problem hiding this comment.
just curious: is there any benefit of when(boolean) vs if-else? is it the same bytecode after all?
Contributor
Author
There was a problem hiding this comment.
this is what I got when decompiling kotlin code for desktop jvm in intellij
looks like when adds some overhead related to throwing NoWhenBranchMatchedException. Why is it doing this - I currently don't know, it is an exhaustive when, compiler should be able to figure it out.
Changed to if in my case, probably if is more idiomatic anyway.
Comment on lines
+109
to
+110
| { Log.w("BackPressure", "THRESHOLD REACHED!") }, | ||
| { Log.e("BackPressure", "ITEM DROPPED $it!") }, |
Member
There was a problem hiding this comment.
let's avoid screaming in the logs :)
Suggested change
| { Log.w("BackPressure", "THRESHOLD REACHED!") }, | |
| { Log.e("BackPressure", "ITEM DROPPED $it!") }, | |
| { Log.w("BackPressure", "Threshold reached") }, | |
| { Log.e("BackPressure", "Item dropped: $it") }, |
ambushwork
previously approved these changes
May 14, 2025
0xnm
approved these changes
May 14, 2025
aleksandr-gringauz
deleted the
aleksandr-gringauz/RUM-9958/align-datadog-init-with-ios-for-benchmarks
branch
May 14, 2025 13:17
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
As we discussed in one of our meetings, we should align Datadog SDK initialization for baseline runs of our benchmark scenarios between iOS and Android. The consensus was to do it the same way as on iOS - for baseline runs no Datadog components should be initialized. For example for session replay link.
What changed:
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)