Skip to content

[RUM-14243] Implement transport layer & batch management#19

Merged
cdn34dd merged 9 commits into
mainfrom
carlosnogueira/RUM-14243/implement-transport-layer
Mar 11, 2026
Merged

[RUM-14243] Implement transport layer & batch management#19
cdn34dd merged 9 commits into
mainfrom
carlosnogueira/RUM-14243/implement-transport-layer

Conversation

@cdn34dd

@cdn34dd cdn34dd commented Feb 19, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Implement the transport layer responsible for buffering RUM events to disk and uploading them to the Datadog intake on a configurable schedule.

Changes

  • Added Batch layer: BatchProducer writes events as to .tmp files, rotates them to .log when full. BatchConsumer reads .log files and POSTs them to the intake. BatchManager orchestrates both on a periodic upload cycle.
  • Added Transport layer: Routes SERVER events by track type to per-domain BatchManager instances. Domains implement an init() method called after batching is wired up, ensuring no events are dropped during startup.
  • Updated types and constants
  • Updated RumCollection: Implements Domain interface, deferring ViewCollection creation to init().
  • Updated init flow: Wires up Assembly → Transport → Domain initialization in the correct order.

Test instructions

Checklist

  • Tested locally (playground)
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Feb 19, 2026

Copy link
Copy Markdown

✅ Code Quality    ✅ Code Vulnerabilities    ✅ Library Vulnerabilities

🎉 All green!

🛠️ No new code quality issues
🛡️ No new code vulnerabilities
📚 No new vulnerable libraries detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 417150a | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@cdn34dd cdn34dd force-pushed the carlosnogueira/RUM-14243/implement-transport-layer branch 2 times, most recently from 833432d to 92e4ab8 Compare March 3, 2026 08:31
@cdn34dd cdn34dd marked this pull request as ready for review March 3, 2026 08:32
@cdn34dd cdn34dd requested a review from bcaudan as a code owner March 3, 2026 08:32
@cdn34dd cdn34dd force-pushed the carlosnogueira/RUM-14243/implement-transport-layer branch 2 times, most recently from 2c486bc to 4a2543c Compare March 3, 2026 09:13
Comment thread src/transport/Transport.ts
Comment thread src/config.ts
Comment thread src/config.ts Outdated
Comment thread src/index.ts
Comment thread src/transport/Transport.ts Outdated
Comment thread src/transport/Transport.ts Outdated
Comment thread src/transport/batch/BatchProducer.ts
Comment thread src/transport/batch/BatchManager.ts Outdated
Comment thread src/transport/batch/BatchManager.ts
Comment thread src/transport/batch/BatchManager.ts
Comment thread docs/ARCHITECTURE.md Outdated
Comment thread docs/ARCHITECTURE.md Outdated
Comment thread src/domain/rum/RumCollection.ts Outdated
Comment thread src/transport/Transport.ts Outdated
Comment thread src/transport/transport.types.ts Outdated
Comment thread src/transport/batch/BatchProducer.ts Outdated
Comment thread src/transport/batch/BatchManager.ts Outdated
Comment thread src/transport/batch/BatchManager.ts Outdated
Comment thread src/transport/batch/BatchManager.ts
Comment thread src/transport/batch/BatchManager.ts Outdated
@cdn34dd cdn34dd force-pushed the carlosnogueira/RUM-14243/implement-transport-layer branch from 76bc066 to 9de4d78 Compare March 11, 2026 11:57
@cdn34dd cdn34dd force-pushed the carlosnogueira/RUM-14243/implement-transport-layer branch 2 times, most recently from 76ed5cc to ddef135 Compare March 11, 2026 12:21
@cdn34dd cdn34dd requested a review from bcaudan March 11, 2026 12:27
@cdn34dd cdn34dd force-pushed the carlosnogueira/RUM-14243/implement-transport-layer branch from ddef135 to 417150a Compare March 11, 2026 14:23

@bcaudan bcaudan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work 🎉

@cdn34dd cdn34dd merged commit b1ffe15 into main Mar 11, 2026
10 checks passed
@cdn34dd cdn34dd deleted the carlosnogueira/RUM-14243/implement-transport-layer branch March 11, 2026 15:22
@bcaudan bcaudan mentioned this pull request Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants