@@ -35,17 +64,7 @@ export function SettingsTab() {
Browser SDK
-
- {sdkDevServerStatus === DevServerStatus.AVAILABLE && useDevBundles ? (
- Overridden
- ) : sdkDevServerStatus === DevServerStatus.AVAILABLE ? (
- Available
- ) : sdkDevServerStatus === DevServerStatus.CHECKING ? (
- Checking...
- ) : (
- Unavailable
- )}
-
+ {badgeStatus()}
@@ -56,6 +75,55 @@ export function SettingsTab() {
+ {datadogMode && (
+ <>
+
+ Injection variant:
+ {
+ setSetting('injectionVariant', value as InjectionVariant)
+ }}
+ />
+
+ }
+ description={<>>}
+ />
+
+ {injectionVariant === 'cdn' && (
+
+ SDK injection type:
+ {
+ setSetting('sdkInjectionType', value as SdkInjectionType)
+ }}
+ />
+
+ }
+ description={<>>}
+ />
+ )}
+ >
+ )}
+
diff --git a/developer-extension/src/panel/hooks/useSettings.ts b/developer-extension/src/panel/hooks/useSettings.ts
index 732bb84279..437bcf2574 100644
--- a/developer-extension/src/panel/hooks/useSettings.ts
+++ b/developer-extension/src/panel/hooks/useSettings.ts
@@ -19,6 +19,8 @@ const DEFAULT_SETTINGS: Readonly = {
logsConfigurationOverride: null,
debugMode: false,
datadogMode: false,
+ injectionVariant: 'local-dev',
+ sdkInjectionType: 'BOTH',
}
let settings: Settings | undefined
@@ -46,9 +48,19 @@ async function loadSettingsFromStorage() {
function setSetting(name: Name, value: Settings[Name]) {
settings![name] = value
+
+ const settingsToStore: Partial = { [name]: value }
+
+ // Reset injectionVariant to default when Datadog mode is disabled
+ if (name === 'datadogMode' && value === false) {
+ settings!.injectionVariant = DEFAULT_SETTINGS.injectionVariant
+ settingsToStore.injectionVariant = DEFAULT_SETTINGS.injectionVariant
+ }
+
onSettingsChange.notify()
+
chrome.storage.local
- .set({ [name]: value })
+ .set(settingsToStore)
.catch((error) => logger.error('Error while storing setting to the storage', error))
if (settings) {
syncSettingsWithSessionStorage(settings)
diff --git a/rum-events-format b/rum-events-format
index fe242fe9a0..1e34da223d 160000
--- a/rum-events-format
+++ b/rum-events-format
@@ -1 +1 @@
-Subproject commit fe242fe9a02cc373e61127d7a2ef629991a5c28f
+Subproject commit 1e34da223dbe809e9b8c90ad2109860ec149ce88