Passing tests do not justify removing retry signals

Before removing retry logs, verify that responders can still detect and diagnose retries, or explicitly decide to retire that coverage.

OpenThunder Editorial · 2026-12-03

In an illustrative refactor, 100 requests succeed, but 40 require a retry. Removing retry logs leaves the success tests passing while erasing evidence of dependency instability.

The function already records its final result, so the retry logs can look redundant. An aggregate retry metric might preserve the required visibility. A final-failure counter would not: all 100 requests succeeded.

The rule is simple: telemetry changes need evidence that their operational purpose survives, or a named decision to retire that purpose. Apply it whenever an edit changes a signal’s meaning, availability or alerting behavior, even when functional tests pass.

Review operational effects regardless of who wrote the code

The author owns the change and should identify telemetry edits explicitly, rather than leave reviewers to discover them inside a larger refactor. The service owner is accountable for accepting any reduction in operational coverage.

Coverage includes:

A signal can retain its name while losing its meaning. Changing a duration metric from seconds to milliseconds requires checking both its values and its consumers, even if the edit looks like a rename.

Use this telemetry-change approval matrix

Use this matrix as a starting policy. Replace role labels with named people in each pull request and combine every applicable row. A schema change that also alters alert behavior needs both consumer checks and alert-routing evidence.

Change Required approval Minimum evidence
Presentation-only edit with no change to emitted data, queries or routing Normal code reviewer Diff confirms no machine-consumed field, parser input or operational instruction changes
Log field, event schema or sampling change Named service owner; affected consumer owner when applicable Safe before-and-after events, consumer checks, and an explanation of retained diagnostic value
Metric unit, type, label, aggregation or meaning change Named service owner and owner of affected alerts or dashboards Definition of old and new semantics; checks of dependent queries and alert behavior
Alert condition, evaluation window, severity, destination or suppression change Named service owner and on-call owner A controlled firing case, a non-firing case, and verification of the intended notification destination
Removal of a detection or diagnosis signal, including a source disabled by default Named service owner; on-call owner if incident response is affected Purpose of the removed signal, replacement evidence or explicit retirement rationale, and a recovery plan

“Named owner” means an identifiable person approving the specific trade-off, not merely tagging a team. One person can hold multiple roles; low-risk changes do not need a committee.

Treat a log message edit as cosmetic only after checking its consumers. A human-readable string can also be a parser input, search pattern or runbook reference.

Apply the rows to the retry refactor

Removing the retry logs triggers the signal-removal row. Its purpose is to expose retries even when requests eventually succeed, and to support investigation. The log/schema row supplies the consumer checks for anything that reads those events. If some logs remain but their fields or sampling change, that row also governs their retained diagnostic value.

For a replacement retry metric, use the metric row to define its semantics and check dependent queries. If an alert changes to use it, apply the alert row too. The evidence must distinguish a successful request that retried from one that did not, then check whatever diagnostic detail the replacement promises to preserve.

Alongside the applicable rows, evidence and approvals, add this short record:

Signal changed:
Affected alerts, dashboards, parsers and runbooks:
Safe rollback or fallback:

For the opening refactor, the record could read:

Signal changed: Remove per-retry logs; replace retry visibility with a
  counter separated by a bounded dependency identifier.
Affected alerts, dashboards, parsers and runbooks: Inventory consumers
  of the removed events; check each against the replacement. Pending.
Safe rollback or fallback: Retain the existing logs until replacement
  checks pass, provided those logs are safe to retain.

That record is not approval evidence. Until the consumer inventory and replacement checks are complete, the removal is unresolved.

An exception should name the remaining gap, the person accepting it, a temporary response procedure and a review deadline. Approval records acceptance of the gap; evidence describes what coverage remains. For an ordinary refactor, I would separate unresolved telemetry removal into another change rather than release an unexplained operational loss.

Test the failure condition the replacement must expose

Recording a metric during a successful request only checks that instrumentation executes. A more useful isolated test introduces a retryable failure, allows the request to succeed, and checks that the replacement signal distinguishes that request from one with no retry.

If an alert depends on the replacement, exercise its query and evaluation logic with both firing and non-firing cases. Verify routing through a safe test destination. Testing evaluation and routing need not page the live on-call responder.

A counter increment alone cannot establish that an alert will fire.

Diagnosis needs its own check. An aggregate retry count might reveal a problem while failing to identify the affected dependency. A bounded dependency label could preserve that distinction without retaining request payloads or user identifiers.

Preserve purpose when reducing telemetry

I would approve removal when the replacement preserves the operational purpose and dependent consumers have been checked, subject to the ownership rule above.

More telemetry is not automatically better evidence.

The retry refactor could replace verbose per-retry logs with:

These signals serve different purposes. The retry counter exposes instability even when requests eventually succeed; the terminal-failure counter captures unsuccessful outcomes. Diagnostic events add context, subject to their collection limits.

If those events are sampled, document what cannot be reliably reconstructed. Do not describe a sampled diagnostic trail as a complete history.

A signal can also be retired without replacement when its purpose is obsolete. Record why, identify dependent consumers, and remove stale references. “The code still works” is not a retirement rationale.

Remove sensitive data promptly and keep rollback safe

A coverage policy must not become an excuse to retain sensitive data. If telemetry exposes secrets or disallowed personal information, remove or redact it promptly through the applicable security or privacy process.

Do not copy sensitive examples into the pull request. Use synthetic fixtures, and address existing stored data through the approved handling process.

Preserve a safe signal where possible, such as an error category instead of an exception containing a payload. If replacement coverage is not ready, record the gap and assign an owner to a compensating control, such as temporarily disabling the affected feature.

Restoring sensitive logging is not an acceptable recovery plan.

Try the matrix on one pending change

Choose a pending pull request that touches a logger, metric or alert definition. In five minutes, select the applicable matrix rows, start the short record, and ask the reviewer which operational condition would become harder to see.

If neither author nor reviewer can answer, pause that telemetry edit and find its owner. This connects a code diff to a response decision, but one review will not reveal every undocumented consumer or historical dependency.