RUM-18764: refactor(rum)!: use Browser SDK start/stop Resource APIs on WebGL #336
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.45) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 418 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.361
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #336"
general
weight: 0.35
fuzzybinary
What and why?
Use Browser SDK
startResource/stopResourceto time successful manual WebGL resources and build their events. ReplaceResourceTrackerwith a small map retaining the method, URL, and start attributes needed to report network errors. Remove the unused resource event DTOs and build stop options as JSON in C# to omit absent status, size, and context.Add dedicated direct API tests for two keys sharing a URL and completing in reverse order, start dates, nanosecond durations beyond Int32, method/type/status/size, and attribute merging. On failure, WebGL expects a resource event plus a network error; mobile expects only the network error.
Fix the worker proxy's
StopResourceWithError(key, errorType, errorMessage, attributes)overload to forwardattributesto theErrorInfooverload. Previously, attributes supplied through this string overload were silently dropped on every platform.The error-date assertion expects failure time. It is gated off on Android, with a TODO to remove the gate once the SDK pin includes Android PR #4151 (RUM-19988). The test waits 250 ms before reporting failure so a request-start timestamp falls outside the assertion's tolerance.
Breaking: failed manual WebGL resources now emit a resource event as well as the network error. Remove deprecated
StopResource(key, Exception, attributes)(useStopResourceWithError), the public WebGLResourceTrackerhelper, and theDatadogWebGLRum(IDateProvider)constructor.Comparison with Flutter Web
The successful-resource approach follows Flutter #957.
stopResourcebefore reporting the network error through the plugin'saddEvent. This releases Browser SDK tracking and emits both a resource event and a network error. Mobile SDKs keep their error-only behavior.Comparison with develop
Ran the copied resource tests and long-duration decoder on isolated
developat3922872, with temporary trace assertions and payload capture. No develop SDK changes.| Check | develop | This branch |
|---|---|---|
| Resource date | Completion time | Request start |
| Events for a failed manual resource | Error only | Resource + error on WebGL |
| Method/type/status/size/duration | Correct | Unchanged |
| Stop attributes (string error overload) | Dropped | Forwarded |
| Manual trace/span/
rule_psrlocation |dd(wrong key) |context|Neither captured WebGL version populates the expected
_dd.trace_id,_dd.span_id, or_dd.rule_psrfields. Trace, span, sampling-rate, and context-removal assertions are enabled on Android and iOS. They are gated only on WebGL, with a TODO to follow up with Browser SDK; Unity's previousddversus_ddmapping was already malformed, so I did not replicate it.Review checklist