Your ecommerce monolith moved to microservices on GKE. To improve Cloud Logging indexing and searchability across services with minimal effort, what should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Update microservices to emit structured JSON logs..
Why this is the answer
Updating microservices to emit structured JSON logs is the most effective way to improve Cloud Logging indexing and searchability with minimal effort. Structured logs, especially in JSON format, allow Cloud Logging to automatically parse fields, making them directly searchable and filterable without additional configuration. This significantly enhances the ability to query and analyze logs across multiple services. Enabling Managed Service for Prometheus is for metrics collection and monitoring, not for improving log searchability. Writing application logs to an emptyDir and using a sidecar agent is a valid pattern for log collection, but it doesn't inherently improve searchability unless the logs are already structured; it's more about ensuring logs are sent to Cloud Logging. Instrumenting microservices with OpenTelemetry libraries is excellent for distributed tracing and metrics, and it can also handle structured logging, but simply "instrumenting" doesn't guarantee structured JSON output for logs unless specifically configured for it, making direct structured JSON emission a more direct and minimal effort solution for the stated problem.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed