Skip to content

👷 playground improvements: RUM Explorer button and Playwright test infra#98

Open
bcaudan wants to merge 6 commits into
mainfrom
bcaudan/playground-improvements
Open

👷 playground improvements: RUM Explorer button and Playwright test infra#98
bcaudan wants to merge 6 commits into
mainfrom
bcaudan/playground-improvements

Conversation

@bcaudan
Copy link
Copy Markdown
Collaborator

@bcaudan bcaudan commented Apr 17, 2026

Motivation

The playground lacked tooling for quick session debugging and had no automated test coverage beyond a fragile sleep-based launch check. This PR adds developer-facing features and a proper test infrastructure that agents can use to prototype and self-validate.

Changes

  • Add getInternalContext() internal SDK API exposing session_id for tooling
  • Add "Open in RUM Explorer" button that opens a pre-filtered RUM session in the browser
  • Add Playwright test infrastructure with mock intake, headless mode (DD_TEST_MODE), and proxy override (DD_SDK_PROXY)
  • Replace the sleep-based CI runtime check with yarn test running Playwright scenarios
  • Consolidate playground documentation into playground/README.md

Test instructions

# Unit tests (includes new getInternalContext tests)
yarn test

# Playground Playwright test
cd playground && yarn test

# Manual: launch playground, click "Open in RUM Explorer"
yarn dev:playground

Checklist

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

bcaudan added 2 commits April 17, 2026 14:49
Exposes session_id for tooling (e.g. linking to RUM Explorer).
Returns undefined when SDK is not initialized or session is expired.
Uses getInternalContext() to build a pre-filtered RUM Explorer URL
and opens it in the default browser via shell.openExternal().
@bcaudan bcaudan force-pushed the bcaudan/playground-improvements branch from 6300f73 to 7425ac2 Compare April 17, 2026 13:54
- Test mode support: DD_TEST_MODE (headless), DD_SDK_PROXY (mock intake)
- Playwright fixtures reusing e2e/lib/intake.ts
- Replace scripts/cli runtime check with direct yarn test in CI
- Move playground docs from DEVELOPMENT.md to playground/README.md
@bcaudan bcaudan force-pushed the bcaudan/playground-improvements branch from 7425ac2 to c64311b Compare April 17, 2026 13:57
@bcaudan bcaudan marked this pull request as ready for review April 17, 2026 15:23
@bcaudan bcaudan requested a review from a team as a code owner April 17, 2026 15:23
@bcaudan bcaudan requested a review from cdn34dd May 5, 2026 07:57
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.

1 participant