
Answer-first summary for fast verification
Answer: Write log output to standard output (stdout) as single-line JSON to be ingested into Cloud Logging as structured logs., Create aggregated exports on application logs to BigQuery to facilitate log analytics.
To standardize logs and make them useful with minimal steps, the best approach is to structure logs properly and use efficient exports. Writing logs to stdout as JSON (C) allows Cloud Logging to ingest them as structured logs without additional code. Exporting to BigQuery (A) via log sinks facilitates analytics with minimal setup. Using the Logging API (D) or Pub/Sub/Dataflow (E) introduces unnecessary complexity. Cloud Storage (B) is less optimal for analytics compared to BigQuery.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Your team builds services running on Google Kubernetes Engine. You want to standardize their log data following Google's best practices and enhance its utility with minimal steps. What should you do? (Select two.)
A
Create aggregated exports on application logs to BigQuery to facilitate log analytics.
B
Create aggregated exports on application logs to Cloud Storage to facilitate log analytics.
C
Write log output to standard output (stdout) as single-line JSON to be ingested into Cloud Logging as structured logs.
D
Mandate the use of the Logging API in the application code to write structured logs to Cloud Logging.
E
Mandate the use of the Pub/Sub API to write structured data to Pub/Sub and create a Dataflow streaming pipeline to normalize logs and write them to BigQuery for analytics.
No comments yet.