nerdexam
GoogleGoogle

PROFESSIONAL-CLOUD-DEVELOPER · Question #349

PROFESSIONAL-CLOUD-DEVELOPER Question #349: Real Exam Question with Answer & Explanation

The correct answer is C: Update your microservices code to emit logs in JSON format.. JSON-formatted logs are structured logs that make indexing and searching easier in Cloud Logging. Cloud Logging can automatically parse JSON logs, which allows for better indexing, querying, and filtering capabilities. By emitting logs in JSON format, you improve the searchabilit

Implementing Observability

Question

Your company recently modernized their monolith ecommerce site to a microservices application in GKE. Your team uses Google Cloud's operations suite for monitoring and logging. You want to improve the logging indexing and searchabilty in Cloud Logging across your microservices with the least amount of effort. What should you do?

Options

  • AAsk the SRE team to enable Managed Service for Prometheus on your GKE cluster.
  • BReconfigure your applications to write logs to an emptyDir volume. Configure a sidecar agent to
  • CUpdate your microservices code to emit logs in JSON format.
  • DInstrument your microservices code with OpenTelemetry libraries.

Explanation

JSON-formatted logs are structured logs that make indexing and searching easier in Cloud Logging. Cloud Logging can automatically parse JSON logs, which allows for better indexing, querying, and filtering capabilities. By emitting logs in JSON format, you improve the searchability and organization of logs across your microservices with minimal code changes, as JSON logs provide structure to log entries without requiring additional services or configurations. Options like enabling Managed Service for Prometheus or instrumenting with OpenTelemetry are useful for monitoring and metrics, but they don't specifically improve log indexing and searchability in Cloud Logging.

Topics

#Cloud Logging#Structured Logging#Microservices Observability#GKE

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER PracticeBrowse All PROFESSIONAL-CLOUD-DEVELOPER Questions