Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Google Exam Professional Cloud DevOps Engineer Topic 1 Question 73 Discussion

Actual exam question for Google's Professional Cloud DevOps Engineer exam
Question #: 73
Topic #: 1
[All Professional Cloud DevOps Engineer Questions]

Your team is preparing to launch a new API in Cloud Run. The API uses an OpenTelemetry agent to send distributed tracing data to Cloud Trace to monitor the time each request takes. The team has noticed inconsistent trace collection. You need to resolve the issue. What should you do?

Show Suggested Answer Hide Answer
Suggested Answer: A

The correct answer is D. Grant the logging.logWriter and monitoring.metricWriter roles to the Compute Engine service accounts.

According to the Google Cloud documentation, the Compute Engine service account is a Google-managed service account that is automatically created when you enable the Compute Engine API1. This service account is used by default to run your Compute Engine instances and access other Google Cloud services on your behalf1. To ensure that monitoring metrics and logs for the instances are visible in Cloud Logging and Cloud Monitoring, you need to grant the following IAM roles to the Compute Engine service account23:

The logging.logWriter role allows the service account to write log entries to Cloud Logging4.

The monitoring.metricWriter role allows the service account to write custom metrics to Cloud Monitoring5.

These roles grant the minimum permissions that are needed for logging and monitoring, following the principle of least privilege. The other roles are either unnecessary or too broad for this purpose. For example, the logging.editor role grants permissions to create and update logs, log sinks, and log exclusions, which are not required for writing log entries6. The logging.admin role grants permissions to delete logs, log sinks, and log exclusions, which are not required for writing log entries and may pose a security risk if misused. The monitoring.editor role grants permissions to create and update alerting policies, uptime checks, notification channels, dashboards, and groups, which are not required for writing custom metrics.


Service accounts, Service accounts. Setting up Stackdriver Logging for Compute Engine, Setting up Stackdriver Logging for Compute Engine. Setting up Stackdriver Monitoring for Compute Engine, Setting up Stackdriver Monitoring for Compute Engine. Predefined roles, Predefined roles. Predefined roles, Predefined roles. Predefined roles, Predefined roles. [Predefined roles], Predefined roles. [Predefined roles], Predefined roles.

Contribute your Thoughts:

Ozell
19 days ago
I'm leaning towards D, always-allocated CPU. That might provide more consistent performance, but it could also be overkill. Gotta find that sweet spot, you know?
upvoted 0 times
...
Ming
1 months ago
Haha, increasing the CPU limit to 4 might work, but that's a bit like trying to solve a problem by throwing more hardware at it. Not very efficient!
upvoted 0 times
Emeline
16 days ago
Optimize the sampling rate of the traces to reduce the load on Cloud Trace.
upvoted 0 times
...
Samira
22 days ago
Check the configuration of the OpenTelemetry agent to ensure it is set up correctly.
upvoted 0 times
...
...
Arletta
2 months ago
I think configuring CPU to be always-allocated might be the best solution for consistent trace collection.
upvoted 0 times
...
Gilma
2 months ago
Option B, using an HTTP health check, seems like a reasonable choice too. That could help ensure the API is responsive and healthy, which could impact the tracing data.
upvoted 0 times
Laurel
12 days ago
B) Use an HTTP health check.
upvoted 0 times
...
Nakisha
1 months ago
A) Increase the CPU limit in Cloud Run from 2 to 4.
upvoted 0 times
...
...
Marti
2 months ago
I disagree, I believe we should use an HTTP health check to resolve the issue.
upvoted 0 times
...
Isadora
2 months ago
I think we should increase the CPU limit in Cloud Run from 2 to 4.
upvoted 0 times
...
Maryann
2 months ago
I think the correct answer is C. Configuring CPU to be allocated only during request processing sounds like the best way to optimize resource usage and improve trace collection consistency.
upvoted 0 times
Lilli
6 days ago
Using an HTTP health check could also be beneficial for monitoring the API.
upvoted 0 times
...
Harrison
9 days ago
But wouldn't increasing the CPU limit in Cloud Run also help with trace collection?
upvoted 0 times
...
Leontine
12 days ago
I agree, configuring CPU to be allocated only during request processing makes sense.
upvoted 0 times
...
Arminda
1 months ago
I think the correct answer is C.
upvoted 0 times
...
...

Save Cancel