Operations

Observability & Logging Hygiene

Foundational

You cannot operate a system you cannot see. Observability is the difference between knowing the system is healthy and only hoping it is. It also turns a five-hour diagnosis into a five-minute one. But logs and telemetry are a data store too. In a regulated business, they must never leak sensitive data.

Good observability means that when something goes wrong, you can answer what, where, and why from the telemetry alone. You should not need to attach a debugger or ask a customer to reproduce the problem. This comes from three pillars working together: structured logs (events with context), metrics (numbers that show health and trends), and traces (the path of a request across services).

There are two sides to balance. Log enough to diagnose problems and to satisfy audit. But never log secrets, credentials, full PII, or special-category data. The Finperiti context makes this clear: a log line with a passport number or a token is both a GDPR breach and a security hole. By default, make telemetry rich in context and free of sensitive data.

Make the system observable

Keep telemetry clean and safe

Logging the whole payload log.Info($"Onboarding request: {JsonSerializer.Serialize(request)}");

Serialising the whole request dumps the name, date of birth, document numbers, and maybe a token straight into the logs. That is a GDPR breach and a credential leak in one line.

Structured, referenced, redacted log.Info("Onboarding started {CustomerId} {TenantId} {CorrelationId}",
customerId, tenantId, correlationId);

The event is fully traceable and easy to query, scoped to its tenant, and contains no sensitive data. You can diagnose it without putting data at risk.

Self-review checklist

Why it matters: Observability turns an outage from a guessing game into a diagnosis. Good telemetry is the basis of both reliability and incident response. But careless logging is one of the most common ways sensitive data leaks. The goal is telemetry that is rich in context and completely free of secrets and personal data.