Toggle Travel is a fully instrumented travel booking app โ every search, booking, error, and AI interaction is observable through LaunchDarkly. Use the pages below to explore each use case.
Each topic maps to a real capability in the LaunchDarkly Observability platform.
The five steps behind every flag in Toggle Travel โ import the SDK, initialize the client, build a context, evaluate the flag, and track events. The actual code, server and browser.
See how a hard-coded 404 on the Atlantis destination surfaces in real time on the LD Observability Errors page โ with full browser and server context.
How LaunchDarkly tracks every flag evaluation in the browser and on the server, and ties them to sessions, traces, and user context.
Watch real user sessions โ every click, scroll, and rage-click recorded and linked back to the traces and flag evaluations active at the time. Built on rrweb.
Ship a change to a slice of traffic, let LaunchDarkly watch the booking-error rate, and revert automatically when the treatment arm regresses โ the daily 7am checkout incident, self-healed.
An A/B/n experiment on the promo banner that names the highest-converting message, and a bandit that auto-optimizes search ranking toward the most engaging sort.
Full request traces from browser click through Express route to external service calls โ with the LD context that was active for that request.
Structured Winston logs forwarded to LD Observability via a custom transport, correlated to traces and sessions automatically.
Custom booking revenue and failure metrics tracked as LD events, with threshold and anomaly alerts routing to Slack when something goes wrong.
Every signal in this app flows through the LaunchDarkly Observability SDK โ browser and server.
The five steps behind every flag in Toggle Travel, modeled on the real Node server SDK code in src/launchdarkly.js. The browser SDK works the same way.
Toggle Travel runs the LaunchDarkly Node server SDK, with the Observability plugin loaded alongside it.
This pulls flag data from LaunchDarkly's edge-based Flag Delivery Network in under 200ms. The Observability plugin wires in traces, logs, and metrics at the same time.
A context describes who (or what) you're evaluating for โ and every attribute on it is something you can target, segment, or roll out by. Toggle Travel keys users by their session id (the stable randomization unit) and attaches loyalty tier, geo, and device so the same context works for targeting and experiment bucketing. Server and browser build it identically.
Every request asks LaunchDarkly for the variation, passing a default. This is the checkout flag that drives the daily guarded release:
Custom events feed metrics, experiments, and guarded-rollout guards. Toggle Travel fires these on booking outcomes:
public/js/flags.js) mirrors this: LDClient.initialize(clientSideId, context, { plugins }), then ldClient.variation(key, default) and ldClient.track(event, data) โ plus the Session Replay plugin for recordings.