Skip to content

✨ [RUM-14582] Initiate view collection#20

Merged
bcaudan merged 6 commits into
mainfrom
bcaudan/main-view-part1
Mar 2, 2026
Merged

✨ [RUM-14582] Initiate view collection#20
bcaudan merged 6 commits into
mainfrom
bcaudan/main-view-part1

Conversation

@bcaudan

@bcaudan bcaudan commented Feb 19, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Track view events corresponding to the main process

Changes

  • add SESSION_EXPIRED lifecycle event, to manage view.is_active attribute
  • replace DummyView by RumCollection and ViewCollection
  • Track the main view lifecycle
    • on creation, emit an initial view event
    • keep session alive by regularly send view updates
    • on SESSION_EXPIRED, emit a final inactive view update
    • on SESSION_RENEW, create a new view

Test instructions

From the playground, you can stop and renew a session to check:

  • different view ids by sessions
  • time spent computed
  • is active status
Screenshot 2026-02-19 at 14 05 01

Checklist

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

@bcaudan bcaudan force-pushed the bcaudan/session-improvements branch from 164791a to ef8235c Compare February 20, 2026 09:49
@bcaudan bcaudan force-pushed the bcaudan/main-view-part1 branch from 5cc4f3e to c026c01 Compare February 20, 2026 09:50
@datadog-datadog-prod-us1

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

Copy link
Copy Markdown

✅ Library Vulnerabilities

🎉 All green!

📚 No new vulnerable libraries detected

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

@bcaudan bcaudan force-pushed the bcaudan/main-view-part1 branch 2 times, most recently from 5b1d5a0 to 0cf8318 Compare February 20, 2026 10:13
Comment thread src/domain/rum/ViewCollection.ts
@bcaudan bcaudan force-pushed the bcaudan/main-view-part1 branch from c898bec to 5a06ae4 Compare February 20, 2026 15:38
@bcaudan bcaudan force-pushed the bcaudan/session-improvements branch from b4f2ca1 to 5c8c4f5 Compare March 2, 2026 08:45
Base automatically changed from bcaudan/session-improvements to main March 2, 2026 08:47
bcaudan added 6 commits March 2, 2026 09:55
to later manage `view.is_active` attribute
- basic class structure: emit view / related hooks
- add missing `is_active` property
- keep session alive by regularly send view updates
- on SESSION_EXPIRED, emit a final inactive view update
- on SESSION_RENEW, create a new view
@bcaudan bcaudan force-pushed the bcaudan/main-view-part1 branch from 4cbc10f to c3b6312 Compare March 2, 2026 08:55
@bcaudan bcaudan marked this pull request as ready for review March 2, 2026 08:55
@bcaudan bcaudan merged commit f98d287 into main Mar 2, 2026
10 checks passed
@bcaudan bcaudan deleted the bcaudan/main-view-part1 branch March 2, 2026 08:57
@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