Observability
26 questions in 8 subtopics.
Micrometer metrics
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?A Gauge registered withregistry.gauge("queue.size", new ArrayList<>(queue), List::size) always reports NaN or stops updating. Why?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?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
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.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 withObservationConvention or ObservationFilter?Distributed tracing
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?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?Define tracing standards for a 200-service platform with mixed languages: propagation format, sampling, retention and which spans are required.OpenTelemetry
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?Design the telemetry pipeline for your company using OpenTelemetry: services, collectors, backends. What problems does the collector solve?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
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?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?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
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?Design the default dashboard and alerts for a Spring Boot REST service. What would you show and which conditions would page someone?On-call engineers receive 300 alerts a week and ignore most. How would you clean up alerting across the organisation?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
Define SLI, SLO and error budget for a checkout API, and explain how multi-window, multi-burn-rate alerting works.How would you introduce SLOs across 50 services so that they actually influence engineering priorities rather than being dashboards nobody reads?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
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.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?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.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?No question matches these choices.