Skip to content

Conversation

@mormubis
Copy link
Contributor

@mormubis mormubis commented Jan 21, 2026

Motivation

Starting telemetry collection earlier in the SDK lifecycle enables:

  • Capture of initialization-phase events
  • Better error tracking during bootstrap
  • Reduced circular dependencies through two-phase initialization

Changes

  • Split telemetry into collection phase (preStart) and transport phase (startLogs/startRum)
  • Hooks start as empty registry in preStart, populated later during startLogs/startRum
    Telemetry interface now includes startTransport() method for deferred initialization
  • Backward compatible: existing code continues to work unchanged

Test instructions

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.

@cit-pr-commenter-54b7da
Copy link

cit-pr-commenter-54b7da bot commented Jan 21, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 167.75 KiB 168.28 KiB +546 B +0.32%
Rum Profiler 4.33 KiB 4.33 KiB 0 B 0.00%
Rum Recorder 24.48 KiB 24.48 KiB 0 B 0.00%
Logs 56.25 KiB 56.79 KiB +554 B +0.96%
Flagging 944 B 944 B 0 B 0.00%
Rum Slim 124.85 KiB 125.39 KiB +556 B +0.43%
Worker 23.63 KiB 23.63 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base CPU Time (ms) Local CPU Time (ms) 𝚫%
addglobalcontext N/A 0.0042 N/A
addaction N/A 0.0202 N/A
adderror N/A 0.0186 N/A
addtiming N/A 0.0031 N/A
startview N/A 0.0039 N/A
startstopsessionreplayrecording N/A 0.001 N/A
logmessage N/A 0.0236 N/A
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
addglobalcontext N/A 26.35 KiB N/A
addaction N/A 114.70 KiB N/A
addtiming N/A 26.51 KiB N/A
adderror N/A 116.71 KiB N/A
startstopsessionreplayrecording N/A 26.36 KiB N/A
startview N/A 487.03 KiB N/A
logmessage N/A 46.07 KiB N/A

🔗 RealWorld

@datadog-official
Copy link

datadog-official bot commented Jan 21, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage
Patch Coverage: 79.31%
Overall Coverage: 77.32% (-0.01%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: cebd232 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@mormubis mormubis changed the title refactor: move telemetry to preStart ♻️ move telemetry to pre-start step Jan 22, 2026
@mormubis mormubis force-pushed the adlrb/earlier-telemetry branch 2 times, most recently from 3e84537 to 1916e8e Compare January 23, 2026 09:53
@mormubis mormubis force-pushed the adlrb/earlier-telemetry branch from ae58005 to cebd232 Compare January 23, 2026 12:08
@mormubis mormubis marked this pull request as ready for review January 23, 2026 12:17
@mormubis mormubis requested a review from a team as a code owner January 23, 2026 12:17
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