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 Professional Cloud DevOps Engineer Exam - Topic 1 Question 73 Discussion

Posted by Margret on Jul 18, 2024 at 07:49 PM

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?

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.

Get Premium Professional Cloud DevOps Engineer Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
34 comments · newest first
LU
Luis 11 months ago
Configuring CPU during request processing seems efficient.
TA
Talia 11 months ago
Surprised that CPU allocation affects trace collection so much!
ED
Edmond 11 months ago
Always-allocated CPU sounds like overkill to me.
AR
Arleen 11 months ago
I think using an HTTP health check is a better approach!
EA
Earleen 12 months ago
Increasing CPU limits can help with performance.
JA
Janessa 12 months ago
I feel like configuring CPU allocation during request processing could help, but I’m not entirely confident about the details.
CO
Coral 1 year ago
I’m a bit confused about the health check option. Does it really impact trace collection directly?
LO
Lorrie 1 year ago
This question feels familiar; I think we practiced something similar where CPU allocation was a factor in trace collection.
LO
Loreta 1 year ago
I remember we discussed how CPU allocation can affect performance, but I'm not sure if increasing the limit is the right approach here.
MA
Marti 1 year ago
I'm pretty confident I know the right answer for this. I'll select it and move on to the next question.
DE
Desirae 1 year ago
Okay, I think I have a strategy here. Let me walk through the options and see which one makes the most sense.
JE
Jeanice 1 year ago
Hmm, I'm a bit confused by the question. I'll need to review the details on OpenTelemetry and Cloud Trace again.
AL
Aleta 1 year ago
This seems like a tricky one. I'll need to think through the different options carefully.
TE
Tess 1 year ago
Hmm, I'm a bit confused about how XFA validations map to the validation-Required (nullTest) in adaptive forms. I'll have to review my notes on that.
KI
Kirk 1 year ago
I'm leaning towards option B with Cloud Spanner. The global replication and ANSI SQL support seem like a good fit for the requirements.
OZ
Ozell 1 year 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?
ER
Eric 1 year ago
↳ replying to Ozell
Have you considered checking the network configuration to ensure smooth trace collection?
EL
Eliz 1 year ago
↳ replying to Ozell
Maybe we should try adjusting the memory allocation to see if that improves performance.
MA
Mariko 1 year ago
↳ replying to Ozell
I think setting up always-allocated CPU could help with the inconsistent trace collection.
MI
Ming 1 year 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!
RO
Rolande 1 year ago
↳ replying to Ming
Consider implementing batching to send multiple traces in a single request to improve efficiency.
EM
Emeline 1 year ago
↳ replying to Ming
Optimize the sampling rate of the traces to reduce the load on Cloud Trace.
SA
Samira 1 year ago
↳ replying to Ming
Check the configuration of the OpenTelemetry agent to ensure it is set up correctly.
AR
Arletta 2 years ago
I think configuring CPU to be always-allocated might be the best solution for consistent trace collection.
GI
Gilma 2 years 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.
LA
Laurel 1 year ago
↳ replying to Gilma
B) Use an HTTP health check.
NA
Nakisha 1 year ago
↳ replying to Gilma
A) Increase the CPU limit in Cloud Run from 2 to 4.
MA
Marti 2 years ago
I disagree, I believe we should use an HTTP health check to resolve the issue.
IS
Isadora 2 years ago
I think we should increase the CPU limit in Cloud Run from 2 to 4.
MA
Maryann 2 years 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.
LI
Lilli 1 year ago
↳ replying to Maryann
Using an HTTP health check could also be beneficial for monitoring the API.
HA
Harrison 1 year ago
↳ replying to Maryann
But wouldn't increasing the CPU limit in Cloud Run also help with trace collection?
LE
Leontine 1 year ago
↳ replying to Maryann
I agree, configuring CPU to be allocated only during request processing makes sense.
AR
Arminda 2 years ago
↳ replying to Maryann
I think the correct answer is C.
0/2000 characters

Save Cancel