Fault Sense is a small (6.5 KB gzipped) JS agent and HTML attribute API you use to validate the expected behavior of a feature in your web app.
You can create and resolve assertions by annotating your HTML with special Fault Sense attributes. You'll use a combination of triggers, types and modifiers to validate functionality within your application and use keys (and optional labels) to categorize them for reporting in your event collection backend. A console collector has been provided to make it easy to try out Fault Sense locally.
The Fault Sense Agent quietly monitors real-world deviations from the expected behavior and generates pass/fail events that can be collected and aggregated to display a breakdown of users who had flawless experiences and those who had faults sensed with the feature or overall release.
Fault Sense works with any language or framework that can render HTML.
You can bring your own backend or use any event collection backend.
Web applications can break without throwing errors—especially in unpredictable, real-world user environments influenced by extensions, blockers, slow connections or device variations and javascript-heavy user interfaces.
For example, a checkout button might fail to render due to an ad blocker, leaving users unable to complete purchases without any errors being logged. In another scenario, a user might click a submit button, but due to a slow network or JavaScript timing issue, the form never submits, and the user receives no feedback. These types of failures are difficult to catch without real-world monitoring, as they don't result in obvious exceptions or log entries.
How do you prove users encountered no issues?
Existing options for monitoring frontend feature health each have limitations. For instance, end-to-end (E2E) tests can simulate user journeys across different browser and OS combinations, but they are still constrained by the controlled environment in which they run. E2E tests often miss real-world issues caused by factors like network speed, browser extensions, or device-specific behaviors.
User Journeys and Session replay, on the other hand, do capture actual user interactions but require a significant amount of data to be captured (especially for monitoring non-error cases) and have challenges related to privacy. You would also typically use these tools to investigate known issues rather than for initial anomaly detection. Though the later could change with AI.
UI tracing and telemetry are some of the best signals we have on the frontend to detect potential problems. However, they often require complex instrumentation and can be challenging to interpret, especially in the context of non-linear user interactions.
What if we could significantly simplify implementing UI tracing? What if it looked more like assertions you would write for e2e tests but run "in the field" through actual usage of your application? What if you didn’t have to anticipate every possible failure point-- just define the happy path and let it do the rest?
Here's a simple counter showing Fault Sense in action. Open the Demo Event Collector panel on the righthand side of the page to see the events Fault Sense logs.