Skip to content

Commit

Permalink
🔥remove shadow_dom_debug flag
Browse files Browse the repository at this point in the history
  • Loading branch information
bcaudan committed Apr 7, 2023
1 parent 48fd053 commit 4785c63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion packages/core/src/tools/experimentalFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// eslint-disable-next-line no-restricted-syntax
export enum ExperimentalFeature {
PAGEHIDE = 'pagehide',
SHADOW_DOM_DEBUG = 'shadow_dom_debug',
FEATURE_FLAGS = 'feature_flags',
RESOURCE_PAGE_STATES = 'resource_page_states',
CLICKMAP = 'clickmap',
Expand Down
12 changes: 2 additions & 10 deletions packages/rum/src/domain/record/shadowRootsController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addTelemetryDebug, DOM_EVENT, ExperimentalFeature, isExperimentalFeatureEnabled } from '@datadog/browser-core'
import { DOM_EVENT } from '@datadog/browser-core'
import type { RumConfiguration } from '@datadog/browser-rum-core'
import type { InputCallback, MutationCallBack } from './observers'
import { initInputObserver, initMutationObserver } from './observers'
Expand Down Expand Up @@ -53,15 +53,7 @@ export const initShadowRootsController = (
removeShadowRoot: (shadowRoot: ShadowRoot) => {
const entry = controllerByShadowRoot.get(shadowRoot)
if (!entry) {
addTelemetryDebug('no shadow root in map', {
shadowRoot: shadowRoot ? shadowRoot.nodeName : 'no node name',
childrenLength: shadowRoot ? shadowRoot.childElementCount : '-1',
controllerByShadowRootSize: controllerByShadowRoot.size,
html:
shadowRoot && isExperimentalFeatureEnabled(ExperimentalFeature.SHADOW_DOM_DEBUG)
? shadowRoot.innerHTML.substring(0, 2000)
: undefined,
})
// unidentified root cause: observed in some cases with shadow DOM added by browser extensions
return
}
entry.stop()
Expand Down

0 comments on commit 4785c63

Please sign in to comment.