LaunchDarkly Observability SDK monorepo. Contains browser, Node.js, mobile, and backend SDKs for session replay, error monitoring, logging, and distributed tracing. Fork of highlight.io.
Package manager: Yarn 4.9.1 (yarn install)
Build system: Turborepo
rrweb: Git submodule at rrweb/ - run git submodule update --init --recursive after clone (the preinstall hook handles this automatically).
yarn install # Install all dependencies
yarn build # Build all packages (excludes rrweb, nextjs)
yarn build:sdk # Build only @launchdarkly/* + highlight.run
yarn test # Build, lint, enforce-size, then test all packages
yarn format-check # Check formatting (prettier)
yarn format:all # Fix formatting
yarn lint # Lint all packages
yarn enforce-size # Check bundle size limits (256KB brotli)
yarn docs # Generate TypeDoc documentationyarn turbo run build --filter @launchdarkly/observability
yarn turbo run test --filter highlight.run
yarn turbo run build --filter '@launchdarkly/*'yarn publish # @launchdarkly/* packages
yarn publish:highlight # highlight.run + @highlight-run/* packages| Package | Description |
|---|---|
observability |
Browser SDK - errors, logs, traces |
session-replay |
Browser SDK - session replay (thin wrapper over highlight.run) |
observability-shared |
Internal shared types and GraphQL codegen (private) |
observability-node |
Node.js SDK |
observability-react-native |
React Native SDK |
react-native-ld-session-replay |
React Native session replay |
observability-python |
Python SDK |
observability-dotnet |
.NET SDK |
observability-android |
Android SDK |
observability-java |
Java SDK |
| Package | Description |
|---|---|
sdk/highlight-run |
Core browser library - session replay + observability. Most logic lives here. |
rrweb/ |
Forked session replay recording library (git submodule, ~15 sub-packages) |
go/ |
Go observability SDK |
src/index.tsx- Public API,Hglobal singletonsrc/sdk/record.ts-RecordSDKclass (session replay recording logic)src/sdk/LDRecord.ts-LDRecordglobal singleton (LaunchDarkly entry point)src/client/index.tsx-Highlightclass (underlying implementation)src/client/workers/highlight-client-worker.ts- Web Worker for async data uploadsrc/client/types/record.ts-RecordOptionstype definitionsrc/client/types/iframe.ts- Cross-origin iframe protocol typessrc/client/constants/sessions.ts- Timing constants (FIRST_SEND_FREQUENCY, etc.)src/plugins/record.ts- LaunchDarkly plugin interface (LDPlugin)
The SDK sends data to https://pub.observability.app.launchdarkly.com by default. Configurable via backendUrl option.
Prettier config (.prettierrc): Tabs, no semicolons, single quotes, trailing commas, 80 char width.
Pre-commit hook (husky): Runs pretty-quick --staged automatically.
TypeScript: Strict mode. All browser SDKs build with Vite (ESM + UMD). Node SDKs use rollup or tsc.
Bundle size: All browser packages enforce 256KB brotli limit via size-limit. Check with yarn enforce-size.
The main workflow is .github/workflows/turbo.yml (runs on push to main and PRs):
yarn installyarn dedupe --checkyarn format-checkyarn test(which runs build -> lint -> enforce-size -> test)- On main: publishes to npm
Other workflows handle language-specific SDKs (Go, Python, .NET, Android, Java, Ruby, Rust, Elixir) and E2E tests.
Releases are managed by release-please - version bumps happen automatically via PR.
Example apps for testing SDK integrations: React, Next.js, Angular, Express, NestJS, Remix, Hono, Cloudflare Worker, React Native, Go, Python, .NET, Ruby, and more.
# Run via docker compose
cd e2e
docker compose build sdk && docker compose build base
docker compose build <example> && docker compose up <example>
# Run specific frameworks via turbo
yarn e2e:nextjs
yarn e2e:express
yarn e2e:cloudflarePython-based tests that start apps, make requests, and validate data appears in the backend via GraphQL queries. Uses app_runner.py for lifecycle management with health check polling.
cd e2e/tests
poetry install
poetry run python src/app_runner.py <example>
poetry run pytestRun tests:
# Diagnose live customer URLs (headed browser, slow-mo for observation)
yarn test:live
# Run local reproduction tests (headless, uses local Express servers on :3001/:3002)
yarn test:local
# Run everything
yarn test