Centralised Logging (ELK/Loki) — Concept Check
Questions on Centralised Logging (ELK/Loki). All services ship structured JSON logs to an aggregator (Elasticsearch, Loki); correlation IDs link logs across service boundaries for end-to-end debugging.
Questions in this quiz
8 questions on Centralised Logging (ELK/Loki) — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A service in your microservices architecture is emitting logs without a correlation ID. What is the likely impact on debugging?
- ADifficult to trace logs across services
- BLogs will not reach the central store
- CLogs will not be stored in Elasticsearch
- DLogs will not be in JSON format
2.Your team uses Logback with MDC for logging. A new developer suggests using plain text instead of JSON for logs. What issue might this cause?
- ALogs will not reach the central store
- BInability to filter logs by correlation ID
- CIncreased log file size
- DLogs will not be stored in Elasticsearch
3.You notice that logs from a Kafka consumer lack correlation IDs. What might be the cause?
- AThe correlation ID is not set in MDC
- BThe consumer is not using JSON format
- CLogs are not being sent to Elasticsearch
- DCorrelation IDs are not extracted from Kafka headers
4.A developer claims that correlation IDs are automatically propagated across Kafka. What is the flaw in this statement?
- AKafka automatically handles correlation IDs
- BKafka does not support headers
- CCorrelation IDs need to be manually attached to Kafka headers
- DCorrelation IDs are only needed for HTTP requests
5.What is the role of a correlation ID in a microservices architecture?
- ALinks logs across services for end-to-end debugging
- BSends logs to Grafana Loki
- CStores logs in Elasticsearch
- DFormats logs as JSON
6.A service logs a correlation ID in one request but not another. What could be a reason?
- AThe logs are not being sent to the central store
- BThe service is using a different logging library
- CThe correlation ID header was missing in the request
- DThe service is not using JSON logging
7.How does Logback's MDC assist in structured logging?
- AAutomatically attaches correlation ID to log lines
- BConverts logs to JSON format
- CFilters logs by user ID
- DSends logs to Elasticsearch
8.In a setup using Promtail and Grafana Loki, what might cause logs to be unsearchable by correlation ID?
- ALogs are not in JSON format
- BThe correlation ID is not set in MDC
- CPromtail is not configured to extract correlation IDs
- DElasticsearch is not indexing the logs