Microservices Monitoring, Logging, and Tracing 3 — Questions and Answers
Question 1: What problem does sampling solve in distributed tracing?
- Reducing the volume and cost of stored traces while keeping representative data (Correct answer)
- Encrypting trace data
- Increasing request latency
- Removing correlation IDs
Correct answer: Reducing the volume and cost of stored traces while keeping representative data
Sampling keeps a subset of traces to control storage and processing costs while preserving useful signal.
Question 2: Which of these are the three pillars of observability?
- Metrics, logs, and traces (Correct answer)
- CPU, RAM, and disk
- Frontend, backend, and database
- Build, test, and deploy
Correct answer: Metrics, logs, and traces
Observability is commonly described through metrics, logs, and traces working together.
Question 3: What does a Service Level Indicator (SLI) measure?
- A quantitative measure of a service's performance, like latency or error rate (Correct answer)
- The number of developers on a team
- The cost of cloud hosting
- The size of the codebase
Correct answer: A quantitative measure of a service's performance, like latency or error rate
An SLI is a measured metric reflecting service quality, such as request latency or availability.
Question 4: In tail-based sampling, when is the sampling decision made?
- After the full trace completes, allowing decisions based on errors or latency (Correct answer)
- Before the request starts
- At service deployment time
- Only at midnight
Correct answer: After the full trace completes, allowing decisions based on errors or latency
Tail-based sampling waits until the trace finishes so it can prioritize slow or errored traces.
Question 5: Why is high-cardinality data a concern in metrics systems like Prometheus?
- Many unique label combinations explode time-series count and memory usage (Correct answer)
- It improves query speed
- It reduces storage needs
- It removes the need for dashboards
Correct answer: Many unique label combinations explode time-series count and memory usage
Each unique label combination creates a separate time series, so high cardinality can overwhelm storage and memory.
Question 6: What is the main role of a metrics exporter or scraper in Prometheus-based monitoring?
- To collect metrics from service endpoints at intervals (Correct answer)
- To send emails to users
- To compile application code
- To manage DNS records
Correct answer: To collect metrics from service endpoints at intervals
Prometheus scrapes metrics exposed at service endpoints on a configured interval and stores them.
Question 7: Which signal best helps diagnose a slow request crossing five microservices?
- A distributed trace showing latency per span (Correct answer)
- A single host's CPU metric
- An aggregated daily log count
- The container image size
Correct answer: A distributed trace showing latency per span
A distributed trace breaks the request into per-service spans, revealing where the latency accumulates.
What problem does sampling solve in distributed tracing?