RUM drops XHR resources when two requests with the same method start in the same millisecond (resource key collision)
Maintainer thường phản hồi trong vòng 2 ngày
@marco-saia-datadog đang làm issue này rồi.
Từ ngày 19/10/2026.
- #1505 của @marco-saia-datadog — đã merge
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 85/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react-native, typescript
- Lĩnh vực
- observability-sre
Hướng nghiên cứu
Kiểm tra việc tạo khóa và báo cáo resource trong packages/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.ts. Lần theo proxyOpen và reportXhr, sau đó để mỗi XHR được mở mang một mã định danh resource duy nhất để các yêu cầu đồng thời dùng cùng một phương thức nhận được các khóa RUM khác nhau. Xác minh bằng các bài kiểm thử XHRProxy hiện có hoặc một trường hợp tái hiện có mục tiêu, xác nhận rằng tất cả các yêu cầu song song trong một mili giây đều được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
XHRProxy builds the RUM resource key from the start timestamp (millisecond precision) and the HTTP method only:
// packages/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.ts
const key = `${context.timer.startTime}/${context.method}`;
ResourceReporter then calls DdRum.startResource(key, …) / DdRum.stopResource(key, …) with that key. When two requests with the same method start in the same millisecond, which is common when a screen fires a burst of parallel GETs, they get the same key. Only one of them ends up as a RUM resource; the other is silently dropped.
The same logic is still on develop (checked October 2026), so newer releases up to 3.10.0 appear to have it too.
Reproduction steps
- Fire several GET requests in parallel through XHR (axios here) when a screen mounts. Some of them start in the same millisecond.
- Compare the RUM resources for the session with an independent network capture: the backend logs, or a second RUM tool capturing the same requests.
- Requests that share a start millisecond and method with another request are missing from Datadog.
SDK logs
One session, Android, ~68 requests, compared against a second RUM SDK capturing the same requests. Datadog missed 4, and each one started in the same millisecond as another GET that Datadog kept:
| Missing in Datadog | Start (ms) | Same-ms GET that was recorded |
|---|---|---|
GET /eds/v2/???/<id> |
.937 | GET /api/2.0/??? |
GET /api/4.0/???/history |
.682 | GET /api/4.0/??? |
GET /???/api/v1/???/settings |
.683 | GET /api/2.0/??? |
GET /api/2.0/???? |
.931 | GET /api/2.0/???/.../??? |
All 4 returned 200 in 0.4–1.0s. Nothing filters them (no resourceEventMapper). The loss repeats across sessions, roughly 4–6% of requests on screens that load many endpoints at once.
Expected behavior
Every completed XHR is reported as its own RUM resource, however many requests start in the same millisecond.
Make the key unique per request, e.g. by adding a module-level counter (or a random ID) when the XHR is opened:
let resourceSequence = 0;
// in proxyOpen, store a unique id on _datadog_xhr:
this._datadog_xhr = { /* … */, resourceId: ++resourceSequence };
// in reportXhr:
const key = `${context.timer.startTime}/${context.method}/${context.resourceId}`;
Affected SDK versions
@datadog/mobile-react-navigation: 3.5.3
Latest working SDK version
@datadog/mobile-react-navigation: 3.5.3
Did you confirm if the latest SDK version fixes the bug?
Yes
Integration Methods
NPM
React Native Version
- React Native 0.81.4, New Architecture (Fabric)
Package.json Contents
@datadog/mobile-react-navigation: 3.5.3
iOS Setup
No response
Android Setup
No response
Device Information
- Android 16 (Samsung SM-S926B). Not yet verified on iOS, but the key logic is shared JS.
Other relevant information
No response
- Ngôn ngữ chính
- TypeScript
- Star
- 146
- Fork
- 67
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 23
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DataDog/dd-sdk-reactnative
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
DataDog/dd-sdk-reactnative#1499 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[actionNameAttribute] prop doesn't accept value with curly bracesCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
DataDog/dd-sdk-reactnative#1486 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Expose Android app startup Activity filtering in the React Native SDKCó thể đã có người làm @sbarrio đã nhận 12 ngày trước. Đang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
DataDog/dd-sdk-reactnative#1485 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
GraphQL variables with non-ASCII contents will make Apollo Client request throw errorCó thể đã có người làm @cdn34dd đã nhận 14 ngày trước. Đang mởawaiting response bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
DataDog/dd-sdk-reactnative#1482 · 2 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Interaction tracking records nothing: the babel plugin's injected import makes Metro bundle a second copy of the SDK, so DdBabelInteractionTracking.config is set on a different class than instrumented handlers callCó thể đã có người làm @cdn34dd đã nhận 12 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
DataDog/dd-sdk-reactnative#1377 · 1 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của DataDog/dd-sdk-reactnative
Issue tương tự
-
[BUG] rag: sentence content can cross the reported sentence boundariesCó thể đã có người làm @LJK-ikun đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
README: the Resource URI Schemas example's file://documents/* pattern only matches that literal URIĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
platformatic/mcp#361 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Push: sem service worker ou sem VAPID, o interruptor de Notificações fica ligado sem avisar nadaĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
melgarafael/DeskcommCRM#3164 ·
Maintainer thường phản hồi trong vòng 1 ngày