Logging, monitoring and observability – Server Side interview prep

261 interview-style multiple-choice questions on Logging, monitoring and observability, organized by topic: concepts, scenarios, code to read and tradeoffs, each with a short explanation. Learn the 148 key terms with the flashcards first, then test yourself.

Take the practice test · Flashcards · All study tools

What it covers

  1. 16.1 Logging practices
  2. 16.2 Log pipelines and storage
  3. 16.3 Metrics fundamentals
  4. 16.4 Prometheus, PromQL and dashboards
  5. 16.5 Distributed tracing
  6. 16.6 OpenTelemetry in practice
  7. 16.7 SLOs and alerting
  8. 16.8 Incidents and on-call
  9. 16.9 Health checks, synthetics and profiling

Key terms

16.1 Logging practices

Structured logging
Logs as queryable fields, not free text
Log level
Severity like Debug, Information, Warning, Error
Correlation ID
ID linking logs from one request
Redaction
Removing sensitive data from logs
Log levels
TRACE to FATAL
ERROR level
Failed, may need action
Runtime log level
Change without redeploy
PII in logs
Avoid or mask
Log injection
Forged entries
Log context
Request, user, tenant IDs
Message template
Constant message, fields
Log rate limiting
Sample noisy messages
Audit log
Who did what
Canonical log line
One wide event per request
Async logging
Fast but lossy on crash
SLF4J
Logging facade
Error tracker
Grouped errors
stdout logging
Platform collects logs

16.2 Log pipelines and storage

Log shipper
Collect and forward logs
ELK
Elasticsearch, Logstash, Kibana
Loki
Label-indexed logs
Storage tiers
Hot, warm, cold
Grok
Parse text to fields
Disk buffer
Survive backend outages
LogQL
Loki query language
ECS
Elastic Common Schema
DaemonSet agent
Node-level log collection
Redaction processor
Scrub secrets in pipeline
Event vs ingest time
When it happened vs arrived
WORM storage
Write once, read many
Mapping explosion
Too many fields
ILM
Index lifecycle management
syslog
Network log protocol

16.3 Metrics fundamentals

Metric
Numeric measurement over time
Percentile latency
Latency at a given rank, like p99
SLO
Service Level Objective
Error budget
Allowed unreliability under an SLO
Counter
Only increases
Gauge
Goes up and down
Histogram
Bucketed distribution
Summary
Client-side quantiles
Counter reset
Restart to zero
Percentile averaging
Meaningless
Saturation metric
Queue length or wait
Apdex
Satisfied, tolerating, frustrated
Pull vs push
Scrape vs send
Exemplar
Trace ID on a metric point
Coordinated omission
Hidden slow latency
Native histogram
Exponential buckets
Temporality
Cumulative vs delta
Route template label
/users/{id}
Tail at scale
Fan-out amplifies tails

16.4 Prometheus, PromQL and dashboards

rate()
Per-second counter increase
irate()
Last two samples
increase()
Total increase over window
sum by
Aggregate keeping labels
histogram_quantile
Percentile from buckets
Recording rule
Precomputed query
for clause
Must hold before firing
Alertmanager
Group, dedupe, route
Pushgateway
Batch job metrics
up metric
Scrape success
Exporter
Exposes a system's metrics
Remote write
Long-term storage
absent()
Alert on missing data
offset
Compare with the past
Dashboard as code
Versioned dashboards

16.5 Distributed tracing

Trace
End-to-end record of one request
Span
Single timed operation in a trace
traceparent
W3C header carrying trace context
OpenTelemetry
Open standard for telemetry collection
Trace ID vs span ID
Request vs operation
Span kind
SERVER, CLIENT, PRODUCER, CONSUMER
Span event
Timestamped note on a span
Head sampling
Decide at the start
Tail sampling
Decide after the trace
Queue propagation
Context in message headers
Span link
Relate several traces
B3
Zipkin headers
tracestate
Vendor trace data
Critical path
Spans setting total time
N+1 in traces
Many tiny DB spans
Trace gap
Uninstrumented time
Jaeger/Tempo
Trace backends
Low-cardinality span name
Route template
Parent-based sampler
Follow upstream decision

16.6 OpenTelemetry in practice

OTLP
OpenTelemetry protocol
Semantic conventions
Standard attribute names
service.name
Main resource attribute
Resource
Who produced the data
API vs SDK
Interface vs implementation
Receiver/processor/exporter
Collector pipeline
Agent vs gateway
Per-node vs central Collector
memory_limiter
Collector back-pressure
k8sattributes
Adds pod metadata
OTTL
Transform language
Span metrics connector
RED from spans
Baggage
Context key-values
OpenTelemetry Operator
Injects agents in k8s
Log bridge
Existing logger to OTel
Metric view
Change aggregation

16.7 SLOs and alerting

Request-based SLI
Good events / valid events
Freshness SLI
How recent data is
Rolling window
e.g. last 28 days
Multi-burn-rate alert
Fast and slow windows
Burn rate 14.4
2% budget per hour
Page vs ticket
Now vs later
Alert fatigue
Ignored noisy alerts
Hysteresis
Separate fire/resolve levels
Watchdog alert
Always firing
predict_linear
Trend forecast
Silence
Mute during maintenance
Journey SLO
End-to-end user flow
SLO as code
Sloth, Pyrra, OpenSLO

16.8 Incidents and on-call

Mitigate first
Stop the bleeding
Rollback
Fastest mitigation for a bad deploy
What changed?
First incident question
Declare early
Cheap to downgrade
Severity level
Response by impact
Comms lead / scribe
Incident roles
Status page update
Impact + next update time
Escalation policy
Who's paged next
MTTA
Mean time to acknowledge
Follow-the-sun
Daytime on-call by region
On-call handoff
Share ongoing issues
Contributing factors
Many causes combine
Near miss
Problem without impact
Kill switch
Flag to disable a feature
Blast radius
Who and what is affected

16.9 Health checks, synthetics and profiling

Liveness probe
Check deciding whether to restart an instance
Readiness probe
Check deciding whether to send traffic
Postmortem
Incident review focused on learning
MTTR
Mean time to recover
Startup probe
Protects slow boot
Shallow liveness
Process stuck only
Graceful shutdown
Fail readiness, drain, exit
Cached health check
Avoid dependency load
Browser synthetic
Scripted user flow
N of M locations
Synthetic alert rule
Heartbeat check
Cron job pings
Cert expiry monitoring
Alert before TLS expires
Blackbox exporter
Probes HTTP, TCP, DNS
Continuous profiling
Always-on production profiles
Off-CPU profile
Time spent blocked
Flame graph width
Share of samples
Differential flame graph
Compare two profiles
Heap profile
Retained memory by site
Span profiles
Profiles linked to traces

Sample practice questions

  1. What are the "three pillars" of observability usually listed as?

    1. CPU, memory and disk
    2. Logs, metrics and traces
    3. Alerts, dashboards and tickets
    4. Dev, test and prod

    Answer: B. Logs, metrics and traces Each answers different questions; together they explain system behavior.

  2. Why centralize logs from all servers into one system?

    1. Application servers aren't able to store log files on their disks
    2. Centralizing logs makes the applications themselves run faster
    3. Instances are many and short-lived, so you need cross-service search
    4. Every regulation everywhere requires logs in one central system

    Answer: C. Instances are many and short-lived, so you need cross-service search Examples: Azure Monitor Logs, Elasticsearch, Loki, Splunk.

  3. What is a metric?

    1. A numeric measurement aggregated over time, like request rate
    2. A configuration setting that controls monitoring
    3. A trace that follows one request across services
    4. A single log line describing one event in detail

    Answer: A. A numeric measurement aggregated over time, like request rate Metrics are cheap to store and great for dashboards and alerts.

  4. What is a dashboard best used for?

    1. Storing raw logs for long-term retention
    2. A quick view of health and help during incidents
    3. Replacing alerts entirely, since people watch it
    4. Deploying new code to production servers

    Answer: B. A quick view of health and help during incidents Dashboards need someone to look; alerts come to you.

  5. What does distributed tracing show?

    1. A list of every deployment made to production
    2. The CPU usage of each server over the past day
    3. One request's path and timing across services, as spans
    4. The schemas of each service's database tables

    Answer: C. One request's path and timing across services, as spans It pinpoints which hop made a request slow.

  6. What does auto-instrumentation give you?

    1. Spans for common libraries without code changes
    2. Automatic fixes for bugs found in production
    3. Automatic scaling of services under heavy load
    4. Automatic deletion of logs past their retention

    Answer: A. Spans for common libraries without code changes Add manual spans for important business operations.

  7. What is an SLO?

    1. A legally binding contract with customers that includes penalties
    2. An internal reliability target, like 99.9% of requests OK under 300 ms
    3. A single raw metric value collected from one server at a time
    4. A log severity level placed between warning and error

    Answer: B. An internal reliability target, like 99.9% of requests OK under 300 ms An SLA is the contractual promise; SLIs are the measured indicators.

  8. What do MTTD and MTTR measure?

    1. Mean time to detect and to recover from incidents
    2. Memory per thread and total threads per request
    3. Monthly counts of tests and of releases shipped
    4. Maximum transfer rate of data and of disk reads

    Answer: A. Mean time to detect and to recover from incidents Good observability shortens both.

  9. What is the difference between a liveness and a readiness probe?

    1. Liveness checks the database; readiness checks free disk space
    2. None; they're the same check, just registered under two names
    3. Liveness: should it restart? Readiness: should it get traffic now?
    4. Readiness restarts the container; liveness removes it from traffic

    Answer: C. Liveness: should it restart? Readiness: should it get traffic now? Don't make liveness depend on downstream services, or one outage restarts everything.

  10. What is structured logging?

    1. Writing every log message entirely in uppercase letters
    2. Writing a separate log file for every class in the app
    3. Sorting the lines of each log file into alphabetical order
    4. Logging key-value data, like JSON, that can be queried by field

    Answer: D. Logging key-value data, like JSON, that can be queried by field `logger.LogInformation("Order {OrderId} placed", id)` keeps `OrderId` as a field.

Practice all 261 questions

More Server Side