Your metrics should track blockchain-specific details. Gas price at confirmation time. Nonce reuse (which breaks transactions). Mempool position. Fee replacement rate. These are not generic payment metrics. These are specific to blockchain.

With distributed tracing, the trace would have shown a payment making it to the blockchain layer and then terminating. No error. No timeout. Just termination. The trace itself would have been the alert.

Structured logging means every log entry is JSON with consistent fields. `trace_id`, `span_id`, `payment_id`, `user_id`, `service`, `operation`, `duration_ms`, `status`, `error_message`. You log events, not messages. An event is structured data that can be queried.

Generic observability is fine. Observability built for crypto payments is better. Your metrics should show payment state changes. API call arrives. Payment created in `pending` state. Queued. Blockchain transaction sent. Awaiting confirmation. Confirmed. Settled.

We use Loki for log aggregation. Every service logs JSON. Labels are attached at ingest time. A query like `payment_id="abc123"` returns every log entry for that payment across the entire system in under a second.

We use OpenTelemetry but customize the instrumentation for our payment flow. Every crypto-specific decision point gets traced. RPC node selection. Gas estimation. Transaction signing. Broadcast. Wait for confirmation. These are the decision points where failures happen.

Without distributed tracing, a payment failure looks like random points of data. API logs say nothing went wrong. Queue logs are empty. Blockchain logs show no transaction. You're looking at isolated systems instead of a connected flow.

When a payment fails, you filter by `payment_id` and every relevant log entry appears, ordered chronologically, across all services. You see the exact sequence of operations. You see where timing degrades. You see where the failure origin is.

Most payment systems have metrics but not traces. They're blind to the full flow. We have both. When something breaks, we understand exactly what and why. The observability infrastructure costs money and complexity, but it's cheaper than flying blind.

These state transitions matter for crypto. A payment can sit in `awaiting_confirmation` for minutes while the blockchain is congested. Your alerts should understand this state. A payment in `awaiting_confirmation` for five minutes is normal. For 30 minutes is a problem.

Your traces should show which RPC node was used for each blockchain call. Different nodes have different state. A payment might confirm on one node but not another. Tracing which node was used helps diagnose why a confirmation check failed.

Raw logs are chaos. You grep for error messages and get thousands of results. You grep for a trace ID and find ten lines spread across different services. By the time you've correlated the logs, the incident is over and you're tired.

We wrapped our entire payment system with OpenTelemetry. Every API endpoint exports trace spans. The job queue exports spans. The blockchain bridge exports spans. The RPC client exports spans. When a payment fails, we pull the trace and understand exactly where and why.

Such incidents are preventable if observability exists. When a payment indexer crashes silently, payments are still created and queued, but the blockchain bridge never confirms them. The system looks healthy because the API is responsive and the queue is empty. Only the blockchain layer is broken.

Two o'clock in the morning. Your payment system starts failing. Payments are stuck. Users are panicking. Your on-call engineer logs in and stares at application logs. Nothing. They check database logs. Nothing. They look at blockchain transactions. Nothing. Nobody knows what's happening because nobody is looking at the full path.

Every payment starts as an API call. The API creates a span, assigns a unique trace ID, and passes it to the next layer. That layer creates a child span. Then the next. By the time the payment reaches blockchain confirmation, dozens of spans have been created, all connected by a single trace ID.

Grafana's Tempo and Jaeger are standard for this. When a payment fails, you query by trace ID and see the entire path. API → Queue → Blockchain Bridge → RPC Call → Blockchain. Every step is visible. Every timing is recorded. Every error is linked to the exact line of code that caused it.

Alerting that doesn't drive you insane. You need alerts when something is actually wrong and needs human intervention. We alert on p99 confirmation latency exceeding three seconds, error rates exceeding 5 percent, and queue depth exceeding 1,000 payments. We don't alert on individual payment failures or occasional RPC errors (they're expected). We alert on patterns that indicate something structural is broken. Most on-call paging is noise.

Start with traces, add metrics, build alerts. If you're building observability from scratch, start with distributed tracing. Every service gets trace instrumentation. When a payment fails, you can follow its path. Add metrics second. Counters for every state transition, histograms for every operation, gauges for pending work. Build alerts third. Alerts based on metrics give you early warnings. Traces let you diagnose the specific failure.

The dashboard you actually need. Your main dashboard shows four things. Confirmation latency histogram, error rate gauge, pending payment count, queue depth. Everything else is diagnostic. When confirmation latency spikes, you click through to the diagnostic dashboard to see which operation is slow. Most dashboards are beautiful and useless during incidents. You need to know three things. Is it broken, how broken is it, where is the break? Our main dashboard is spartan. One latency chart, one error rate chart, one pending count.

Metrics that show what's actually failing. Metrics are numbers over time. Request latency, queue depth, RPC failure rate, blockchain confirmation latency. You need metrics for every component, plus metrics that show the payment flow itself. A payment counter increments for every state transition. A histogram tracks confirmation latency from API call to blockchain inclusion. A gauge shows pending payments. These go into Prometheus and get visualized in Grafana. When performance degrades, the metrics show it first. API latency spikes, queue depth increases, confirmation latency rises.