Observability, Debugging & Production Operations Interview Questions
14 Go interview questions on observability, debugging & production operations, with detailed answers and code.
Observability, Debugging & Production Operations·Q564·Medium
Delve is the Go debugger. It understands goroutines, the Go scheduler and Go types better than gdb does. The main entry points are: # build and debug the main package…
Observability, Debugging & Production Operations·Q565·Hard
GOTRACEBACK controls how much stack trace the runtime prints on an unrecovered panic or a fatal error: none : no goroutine traces. single (the default): only the…
Observability, Debugging & Production Operations·Q566·Medium
Use the github.com/prometheus/client_golang library: Counters only go up (requests, errors). Query them with rate() . Gauges go up and down (in-flight requests, queue…
Observability, Debugging & Production Operations·Q567·Hard
Setup takes three steps: Create a TracerProvider with an exporter (usually OTLP), a resource (service name) and a sampler. Register it globally along with a propagator.…
Observability, Debugging & Production Operations·Q568·Hard
RPC kinds. gRPC has four: Unary: one request, one response. Server streaming: one request, then stream.Send many times. Client streaming: Recv many times, then…
Observability, Debugging & Production Operations·Q569·Medium
The protobuf wire format identifies each field only by its field number and wire type , never by its name. Two rules follow from this: Backward compatibility (new code…
Observability, Debugging & Production Operations·Q570·Hard
Liveness asks "is this process stuck?". When it fails, Kubernetes restarts the container. It should be cheap and should not check dependencies. If the database goes down…
Observability, Debugging & Production Operations·Q571·Medium
Compile in a full Go image, then copy only the static binary into a tiny runtime image. CGO_ENABLED=0 produces a fully static binary with no libc dependency. Without it,…
Observability, Debugging & Production Operations·Q572·Medium
Load everything into one typed struct at startup. Use a clear order of precedence: defaults, then file, then environment, then flags. Validate the whole struct and fail…
Observability, Debugging & Production Operations·Q573·Hard
crypto/tls has safe defaults. Since Go 1.22 the default minimum version is TLS 1.2 for both clients and servers, and RSA key-exchange cipher suites are no longer offered…
Observability, Debugging & Production Operations·Q574·Hard
The standard library has no WebSocket server. Use github.com/gorilla/websocket or github.com/coder/websocket (formerly nhooyr, context-based and safe for concurrent…
Observability, Debugging & Production Operations·Q575·Hard
SetMaxStack(bytes) : the maximum size of a single goroutine's stack. The default is 1 GB on 64-bit and 250 MB on 32-bit. Going over it is a fatal "goroutine stack…
Observability, Debugging & Production Operations·Q576·Medium
runtime/metrics (Go 1.16+) is the stable, cheap API for runtime statistics. Unlike runtime.ReadMemStats , it does not stop the world. The Prometheus Go collector can…
Observability, Debugging & Production Operations·Q577·Hard
Start from the symptom: p99 latency is up but CPU is not saturated, so time is being spent waiting. Traces tell you which span is slow. Then work out which kind of…