-
Notifications
You must be signed in to change notification settings - Fork 83
RUM-12062: Refactor the configuration and integration of the RUM Debug Widget #2975
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
Merged
kikoveiga
merged 44 commits into
tvaleev/feature/innovation-week-07-04-25
from
kikoveiga/RUM-12062/change-widget-activity-configuration
Nov 26, 2025
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
8a14888
RUM-12062: Overlay now configurable directly in application
kikoveiga 2cc148c
RUM-12060: Remove repeated line
kikoveiga 69e0563
RUM-12060: Update README.md
kikoveiga b5d47a5
RUM-12060: Cut screenshot
kikoveiga c48a483
RUM-12060: Update screenshot
kikoveiga 53ec2ca
RUM-12060: Update screenshot
kikoveiga 47acfe5
RUM-12060: Format README.md
kikoveiga d4296c2
RUM-12060: Push requested changes
kikoveiga e49a7a9
RUM-12060: Update apiSurface
kikoveiga a97e6d8
RUM-12061: Continue unit and integration tests
kikoveiga 7ef18f0
RUM-12061: Add more unit and integration tests
kikoveiga 3590c10
RUM-12061: Finish tests
kikoveiga 07e024e
RUM-12061: Fix formatting
kikoveiga ae7a408
RUM-12062: Fixing rebase
kikoveiga 8b92c71
RUM-12062: Begin reconfiguration of DefaultInsightsCollector with an …
kikoveiga 48f38ac
RUM-12062: Add RumConfiguration Builder extension function
kikoveiga c56bea9
RUM-12062: Improve overlay's animation and attaching to activities
kikoveiga 1e22471
RUM-12062: Add comments and fix magic numbers, dependencies missing i…
kikoveiga 2971f00
Merge branch 'kikoveiga/RUM-12061/add-tests' into kikoveiga/RUM-12062…
kikoveiga c53e593
Rollback one line
kikoveiga d9504f7
RUM-12062: Add @ExperimentalRumApi annotation to OverlayManager.kt
kikoveiga e8efdbd
RUM-12062: ChangeOverlayManager to class
kikoveiga e1bdbed
RUM-12062: Remove unused dependency
kikoveiga 69f3227
Merge branch 'tvaleev/feature/innovation-week-07-04-25' into kikoveig…
kikoveiga c567d6a
RUM-12062: Fix unit tests
kikoveiga 29c1752
RUM-12062: Begin reflection
kikoveiga 4c83907
RUM-12062: Reflection working and README.md done
kikoveiga f3a66c9
RUM-12062: Remove unused lines in README.md
kikoveiga 4ead2c9
RUM-12062: Clean up
kikoveiga 35dfe83
RUM-12062: Test removal of unnecessary suppress
kikoveiga 0a8567b
RUM-12062: Revert
kikoveiga 95e2389
RUM-12062: Revert
kikoveiga cf9befe
RUM-12062: Improve documentation and clean up
kikoveiga e9e72d0
RUM-12062: Push suggested changes
kikoveiga e07a7eb
RUM-12062: Remove unnecessary annotations
kikoveiga 2acb188
RUM-12062: Change enableRumDebugWidget function, now able to allow it…
kikoveiga d7b2d05
RUM-12062: Update API files
kikoveiga de79df8
RUM-12062: Move isDebuggable code inline
kikoveiga e131311
RUM-12062: Update variable name
kikoveiga 703c3f4
RUM-12062: Add consumer-rules.pro file and other small improvements
kikoveiga 7c2f184
RUM-12062: Improve message of internal log
kikoveiga a82c5f9
RUM-12062: Remove reflection
kikoveiga ac995b5
RUM-12062: Fix pipeline
kikoveiga e19cb84
RUM-12062: Fix pipeline
kikoveiga File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1 @@ | ||
| class com.datadog.android.insights.DefaultInsightsCollector : com.datadog.android.rum.internal.instrumentation.insights.InsightsCollector | ||
| constructor(Int = 50, Long = 100L) | ||
| override var maxSize: Int | ||
| override var updateIntervalMs: Long | ||
| override fun onAction() | ||
| override fun onNewView(String) | ||
| override fun onSlowFrame(Long, Long) | ||
| override fun onLongTask(Long, Long) | ||
| override fun onNetworkRequest(Long, Long) | ||
| override fun addUpdateListener(com.datadog.android.rum.internal.instrumentation.insights.InsightsUpdatesListener) | ||
| override fun removeUpdateListener(com.datadog.android.rum.internal.instrumentation.insights.InsightsUpdatesListener) | ||
| override fun onMemoryVital(Double?) | ||
| override fun onCpuVital(Double?) | ||
| override fun onSlowFrameRate(Double?) | ||
| companion object | ||
| class com.datadog.android.insights.LocalInsightOverlay : com.datadog.android.rum.internal.instrumentation.insights.InsightsUpdatesListener | ||
| fun attach(android.app.Activity) | ||
| fun detach() | ||
| override fun onDataUpdated() | ||
| companion object | ||
| fun com.datadog.android.rum.RumConfiguration.Builder.enableRumDebugWidget(android.app.Application, Boolean = false): com.datadog.android.rum.RumConfiguration.Builder |
35 changes: 3 additions & 32 deletions
35
features/dd-sdk-android-rum-debug-widget/api/dd-sdk-android-rum-debug-widget.api
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,5 @@ | ||
| public final class com/datadog/android/insights/DefaultInsightsCollector : com/datadog/android/rum/internal/instrumentation/insights/InsightsCollector { | ||
| public static final field Companion Lcom/datadog/android/insights/DefaultInsightsCollector$Companion; | ||
| public fun <init> (IJ)V | ||
| public synthetic fun <init> (IJILkotlin/jvm/internal/DefaultConstructorMarker;)V | ||
| public fun addUpdateListener (Lcom/datadog/android/rum/internal/instrumentation/insights/InsightsUpdatesListener;)V | ||
| public fun getMaxSize ()I | ||
| public fun getUpdateIntervalMs ()J | ||
| public fun onAction ()V | ||
| public fun onCpuVital (Ljava/lang/Double;)V | ||
| public fun onLongTask (JJ)V | ||
| public fun onMemoryVital (Ljava/lang/Double;)V | ||
| public fun onNetworkRequest (JJ)V | ||
| public fun onNewView (Ljava/lang/String;)V | ||
| public fun onSlowFrame (JJ)V | ||
| public fun onSlowFrameRate (Ljava/lang/Double;)V | ||
| public fun removeUpdateListener (Lcom/datadog/android/rum/internal/instrumentation/insights/InsightsUpdatesListener;)V | ||
| public fun setMaxSize (I)V | ||
| public fun setUpdateIntervalMs (J)V | ||
| } | ||
|
|
||
| public final class com/datadog/android/insights/DefaultInsightsCollector$Companion { | ||
| } | ||
|
|
||
| public final class com/datadog/android/insights/LocalInsightOverlay : com/datadog/android/rum/internal/instrumentation/insights/InsightsUpdatesListener { | ||
| public static final field Companion Lcom/datadog/android/insights/LocalInsightOverlay$Companion; | ||
| public fun <init> ()V | ||
| public final fun attach (Landroid/app/Activity;)V | ||
| public final fun detach ()V | ||
| public fun onDataUpdated ()V | ||
| } | ||
|
|
||
| public final class com/datadog/android/insights/LocalInsightOverlay$Companion { | ||
| public final class com/datadog/android/insights/internal/RumDebugWidgetKt { | ||
| public static final fun enableRumDebugWidget (Lcom/datadog/android/rum/RumConfiguration$Builder;Landroid/app/Application;Z)Lcom/datadog/android/rum/RumConfiguration$Builder; | ||
| public static synthetic fun enableRumDebugWidget$default (Lcom/datadog/android/rum/RumConfiguration$Builder;Landroid/app/Application;ZILjava/lang/Object;)Lcom/datadog/android/rum/RumConfiguration$Builder; | ||
| } | ||
|
|
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| -keep class com.datadog.android.insights.internal.RumDebugWidget | ||
|
kikoveiga marked this conversation as resolved.
|
||
169 changes: 0 additions & 169 deletions
169
...roid-rum-debug-widget/src/main/kotlin/com/datadog/android/insights/LocalInsightOverlay.kt
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
...k-android-rum-debug-widget/src/main/kotlin/com/datadog/android/insights/RumDebugWidget.kt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| /* | ||
| * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. | ||
| * This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
| * Copyright 2016-Present Datadog, Inc. | ||
| */ | ||
|
|
||
| package com.datadog.android.insights | ||
|
|
||
| import android.app.Application | ||
| import android.content.pm.ApplicationInfo | ||
| import com.datadog.android.insights.internal.DefaultInsightsCollector | ||
| import com.datadog.android.insights.internal.overlay.OverlayManager | ||
| import com.datadog.android.rum.RumConfiguration | ||
| import com.datadog.android.rum._RumInternalProxy | ||
|
|
||
| /** | ||
| * Enables the RUM Debug Widget for the given [application]. | ||
| * | ||
| * By default, the widget is only enabled in debug builds (when the application is debuggable). | ||
| * To enable it in release builds (e.g., for local testing), set [allowInRelease] to `true` and | ||
| * add the `dd-sdk-android-rum-debug-widget` module as `implementation` (not `debugImplementation`) | ||
| * in your `build.gradle` file. | ||
| * | ||
| * @param application The application where to enable the RUM Debug Widget. | ||
| * @param allowInRelease Set to `true` to enable the widget in release builds. Defaults to `false` | ||
| * to prevent accidental exposure in production. | ||
| * @return The same [RumConfiguration.Builder] instance. | ||
| */ | ||
| fun RumConfiguration.Builder.enableRumDebugWidget( | ||
| application: Application, | ||
| allowInRelease: Boolean = false | ||
| ): RumConfiguration.Builder = apply { | ||
| val isApplicationDebuggable = (application.applicationInfo.flags and ApplicationInfo.FLAG_DEBUGGABLE) != 0 | ||
| if (!isApplicationDebuggable && !allowInRelease) return@apply | ||
|
|
||
| val insightsCollector = DefaultInsightsCollector() | ||
| _RumInternalProxy.setInsightsCollector(this, insightsCollector) | ||
| application.registerActivityLifecycleCallbacks(OverlayManager(insightsCollector)) | ||
| } |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.