Scrivio Interview library

Observability

26 questions in 8 subtopics.

Micrometer metrics

CodingFoundations7 min read
In a Spring Boot service, record the number of orders placed per payment method and the time taken to process an order with Micrometer. Which meter types do you use, and what is the cardinality risk?
DebuggingFoundations6 min read
A Gauge registered with registry.gauge("queue.size", new ArrayList<>(queue), List::size) always reports NaN or stops updating. Why?
DesignIntermediate7 min read
Explain the difference between client-side percentiles and histograms in Micrometer timers. You need p99 latency per endpoint across 30 instances; which do you configure and why?
LeadershipAdvanced7 min read
Your metrics bill has tripled in a year and dashboards are slow. Investigation shows millions of time series from a few services. What standards and controls would you introduce?

Observation API

ConceptIntermediate6 min read
What is the Micrometer Observation API and how does it differ from creating metrics and spans separately? Show how you would observe a business operation.
CodingIntermediate6 min read
You want every observation for HTTP server requests to add the tenant id to spans but not to metrics, and to rename a tag. How would you do this with ObservationConvention or ObservationFilter?

Distributed tracing

ConceptFoundations6 min read
How does distributed tracing work in Spring Boot 3 and later with Micrometer Tracing? What is propagated between services, and what replaced Spring Cloud Sleuth?
DebuggingIntermediate7 min read
Traces show the HTTP request span but the Kafka message sent during the request starts a new trace in the consumer, and spans from @Async work are missing. How do you fix both?
DesignAdvanced7 min read
Define tracing standards for a 200-service platform with mixed languages: propagation format, sampling, retention and which spans are required.

OpenTelemetry

ConceptIntermediate6 min read
Compare three ways to send OpenTelemetry data from a Spring Boot service: the OpenTelemetry Java agent, Micrometer Tracing with the OpenTelemetry bridge and OTLP exporter, and the OpenTelemetry Spring Boot starter. When would you choose each?
DesignAdvanced6 min read
Design the telemetry pipeline for your company using OpenTelemetry: services, collectors, backends. What problems does the collector solve?
LeadershipPrincipal5 min read
Your company spends millions a year on an observability vendor and teams want to switch to an open-source stack based on OpenTelemetry. How would you make the decision?

Log correlation

ConceptFoundations6 min read
How do trace ids appear in log lines in a Spring Boot 3 or later application, and how would you produce JSON logs for a log platform?
ScenarioIntermediate6 min read
During an incident, engineers can find the failing trace but cannot find related logs from three services because each logs in a different format and one has no trace id. How do you fix this across services?
LeadershipPrincipal6 min read
Log volume costs your company more than its databases, logs contain personal data, and retention differs by team. How would you set a long-term logging strategy covering cost, privacy and usefulness?

Dashboards and alerting

DebuggingFoundations6 min read
A latency dashboard shows the average response time is 80 ms, yet users complain the service is slow. What might the dashboard be hiding, and what would you add?
DesignIntermediate6 min read
Design the default dashboard and alerts for a Spring Boot REST service. What would you show and which conditions would page someone?
LeadershipAdvanced6 min read
On-call engineers receive 300 alerts a week and ignore most. How would you clean up alerting across the organisation?
LeadershipPrincipal6 min read
How would you organise observability as an engineering capability across a company of several hundred engineers: a central team, embedded experts, or each team on its own? What should the central function own?

SLOs

ConceptIntermediate7 min read
Define SLI, SLO and error budget for a checkout API, and explain how multi-window, multi-burn-rate alerting works.
LeadershipAdvanced6 min read
How would you introduce SLOs across 50 services so that they actually influence engineering priorities rather than being dashboards nobody reads?
LeadershipPrincipal6 min read
The CEO wants 99.99 percent availability for the whole platform. How do you respond, and how do you connect reliability targets to cost and organisation design?

Centralized logging with ELK

ConceptFoundations6 min read
Describe how logs from Spring Boot services in Kubernetes reach Elasticsearch and Kibana in an ELK or EFK stack, and why structured JSON logs matter.
DebuggingIntermediate7 min read
Elasticsearch rejects many log events with mapping errors: 'mapper_parsing_exception: failed to parse field [user] of type [keyword]'. Some services log user as a string and others as an object. How do you fix this and prevent it?
DesignAdvanced7 min read
Your self-hosted ELK cluster ingests 5 TB of logs per day, is costly and unstable at peaks. Design changes to make centralized logging sustainable.
LeadershipPrincipal7 min read
Logging contracts with an observability vendor are up for renewal and your self-hosted ELK competes for budget. How would you decide the company's logging platform for the next five years?