docs/solutions/performance-issues/2026-05-03-slate-rendering-strategy-needs-production-rum-metrics.md
DOM strategy work can look good in local benchmark artifacts while production users still hit the wrong cohort, strategy, or native-behavior tradeoff. The runtime needs a small app-facing metric seam so products can tag RUM or Datadog rows with the same facts used in lab proof.
shellCount,
shellAggressiveBoundaryCount, and 'shell' metric enum values still leaked
the old API vocabulary.Add an Editable callback that reports DOM strategy surface metrics after commit:
<Editable
domStrategy="staged"
onDOMStrategyMetrics={(metrics) => {
datadogRum.addAction('slate.dom_strategy.surface', metrics)
}}
/>
The metric payload includes:
In Slate v2 this lands through onDOMStrategyMetrics and exported
EditableDOMStrategyMetrics. Tests cover staged and virtualized surfaces.
When cutting a public DOM mode, audit the metric payload too:
shellCount;aggressiveDomCoverageBoundaryCount;partial-dom, not as the private
implementation name;domStrategy prop type.The callback keeps raw Slate unopinionated while giving products the exact tags they need for dashboards. Benchmarks still own lab proof; RUM owns production drift. Keeping the DOM strategy fields separate prevents partial-DOM or virtualized stress rows from polluting default staged-rendering claims.