---
title: "Failures you can't see: engineering solution"
description: Instrument approved failure events and diagnostic properties for critical product journeys.
product: data
token_estimate: 535
---
# Failures you can't see: engineering solution

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

Track a failure event at the point where your product knows a critical action failed. This is product-specific code or pipeline work. Data Assistant, Autocapture, and chart configuration can't infer a backend failure your product never sends. Start from the approved gap in the [audit](https://amplitude.com/docs/data/data-assistant-user-solutions/error-event-coverage-audit).

## Design the failure signal

1. Start from the approved entry in the audit.
2. Prefer one clearly named event for a meaningful failure outcome. Use event properties when one event needs safe categories such as `flow`, `step`, `error_type`, or `error_code`.
3. Write a description that states exactly when the event fires and which source owns it.
4. Avoid stack traces, free-form messages, access tokens, payment details, email addresses, and other sensitive values. Send an approved code or category instead.
5. Add the event and its properties to the [tracking plan](https://amplitude.com/docs/data/create-tracking-plan) before you change production instrumentation.

## Implement and validate the event

1. Track the event in the code path that handles the confirmed failure, not when the action starts.
2. Include the same stable User ID and contextual properties the surrounding journey uses.
3. Prevent retries from creating duplicate failure events when one failure fires several callbacks.
4. Trigger a safe test failure and confirm the event and properties in [Event Explorer](https://amplitude.com/docs/analytics/charts/event-explorer).
5. Review [Observe](https://amplitude.com/docs/data/validate-events) and confirm the event matches the tracking plan.
6. Add the new failure event to the journey's funnel or monitoring dashboard.

If Session Replay captures the affected surface, link the structured event to replay analysis for context. The event stays the reliable count. The replay explains what happened in individual sessions.

