ExamGecko
Home Home / Google / Professional Cloud Developer

Google Professional Cloud Developer Practice Test - Questions Answers, Page 26

Question list
Search
Search

List of questions

Search

Related questions











You have a web application that publishes messages to Pub/Sub. You plan to build new versions of the application locally and need to quickly test Pub/Sub integration tor each new build. How should you configure local testing?

A.
Run the gclcud config set api_endpoint_overrides/pubsub https: / 'pubsubemulator.googleapi3.com. coin/ command to change the Pub/Sub endpoint prior to starting the application
A.
Run the gclcud config set api_endpoint_overrides/pubsub https: / 'pubsubemulator.googleapi3.com. coin/ command to change the Pub/Sub endpoint prior to starting the application
Answers
B.
In the Google Cloud console, navigate to the API Library and enable the Pub/Sub API When developing locally, configure your application to call pubsub.googleapis com
B.
In the Google Cloud console, navigate to the API Library and enable the Pub/Sub API When developing locally, configure your application to call pubsub.googleapis com
Answers
C.
Install Cloud Code on the integrated development environment (IDE) Navigate to Cloud APIs, and enable Pub/Sub against a valid Google Project ID. When developing locally, configure your application to call pubsub.googleapis com
C.
Install Cloud Code on the integrated development environment (IDE) Navigate to Cloud APIs, and enable Pub/Sub against a valid Google Project ID. When developing locally, configure your application to call pubsub.googleapis com
Answers
D.
Install the Pub/Sub emulator using gcloud and start the emulator with a valid Google Project ID. When developing locally, configure your application to use the local emulator by exporting the fuhsub emulator Host variable
D.
Install the Pub/Sub emulator using gcloud and start the emulator with a valid Google Project ID. When developing locally, configure your application to use the local emulator by exporting the fuhsub emulator Host variable
Answers
Suggested answer: C

You are supporting a business-critical application in production deployed on Cloud Run. The application is reporting HTTP 500 errors that are affecting the usability of the application. You want to be alerted when the number of errors exceeds 15% of the requests within a specific time window. What should you do?

A.
Navigate to the Cloud Run page in the Google Cloud console, and select the service from the services list. Use the Metrics tab to visualize the number of errors for that revision and refresh the page daily.
A.
Navigate to the Cloud Run page in the Google Cloud console, and select the service from the services list. Use the Metrics tab to visualize the number of errors for that revision and refresh the page daily.
Answers
B.
Create a Cloud Function that consumes the Cloud Monitoring API Use Cloud Composer to trigger the Cloud Function daily and alert you if the number of errors is above the defined threshold.
B.
Create a Cloud Function that consumes the Cloud Monitoring API Use Cloud Composer to trigger the Cloud Function daily and alert you if the number of errors is above the defined threshold.
Answers
C.
Create an alerting policy in Cloud Monitoring that alerts you if the number of errors is above the defined threshold.
C.
Create an alerting policy in Cloud Monitoring that alerts you if the number of errors is above the defined threshold.
Answers
D.
Create a Cloud Function that consumes the Cloud Monitoring API Use Cloud Scheduler to trigger the Cloud Function daily and alert you if the number of errors is above the defined threshold
D.
Create a Cloud Function that consumes the Cloud Monitoring API Use Cloud Scheduler to trigger the Cloud Function daily and alert you if the number of errors is above the defined threshold
Answers
Suggested answer: B

You have an application running in a production Google Kubernetes Engine (GKE) cluster. You use Cloud Deploy to automatically deploy your application to your production GKE cluster. As part of your development process: you are planning to make frequent changes to the applications source code and need to select the tools to test the changes before pushing them to your remote source code repository. Your toolset must meet the following requirements:

* Test frequent local changes automatically.

* Local deployment emulates production deployment.

Which tools should you use to test building and running a container on your laptop using minimal resources'?

A.
Terraform and kubeadm
A.
Terraform and kubeadm
Answers
B.
Docker Compose and dockerd
B.
Docker Compose and dockerd
Answers
C.
Minikube and Skaffold
C.
Minikube and Skaffold
Answers
D.
kaniko and Tekton
D.
kaniko and Tekton
Answers
Suggested answer: B

You have an application running on Google Kubernetes Engine (GKE). The application is currently using a logging library and is outputting to standard output You need to export the logs to Cloud Logging, and you need the logs to include metadata about each request. You want to use the simplest method to accomplish this. What should you do?

A.
Change your application s logging library to the Cloud Logging library and configure your application to export logs to Cloud Logging
A.
Change your application s logging library to the Cloud Logging library and configure your application to export logs to Cloud Logging
Answers
B.
Update your application to output logs in CSV format, and add the necessary metadata to the CSV.
B.
Update your application to output logs in CSV format, and add the necessary metadata to the CSV.
Answers
C.
Install the Fluent Bit agent on each of your GKE nodes, and have the agent export all logs from /var/ log.
C.
Install the Fluent Bit agent on each of your GKE nodes, and have the agent export all logs from /var/ log.
Answers
D.
Update your application to output logs in JSON format, and add the necessary metadata to the JSON
D.
Update your application to output logs in JSON format, and add the necessary metadata to the JSON
Answers
Suggested answer: B

Your application stores customers' content in a Cloud Storage bucket, with each object being encrypted with the customer's encryption key. The key for each object in Cloud Storage is entered into your application by the customer. You discover that your application is receiving an HTTP 4xx error when reading the object from Cloud Storage What is a possible cause of this error?

A.
You attempted the read operation without the base64-encoded SHA256 hash of the encryption key.
A.
You attempted the read operation without the base64-encoded SHA256 hash of the encryption key.
Answers
B.
You entered the same encryption algorithm specified by the customer when attempting the read operation.
B.
You entered the same encryption algorithm specified by the customer when attempting the read operation.
Answers
C.
You attempted the read operation on the object with the base64-encoded SHA256 hash of the customer's key.
C.
You attempted the read operation on the object with the base64-encoded SHA256 hash of the customer's key.
Answers
D.
You attempted the read operation on the object with the customers base64-encoded key.
D.
You attempted the read operation on the object with the customers base64-encoded key.
Answers
Suggested answer: D

You are reviewing and updating your Cloud Build steps to adhere to Google-recommended practices. Currently, your build steps include:

1. Pull the source code from a source repository.

2. Build a container image

3. Upload the built image to Artifact Registry.

You need to add a step to perform a vulnerability scan of the built container image, and you want the results of the scan to be available to your deployment pipeline running in Google Cloud. You want to minimize changes that could disrupt other teams' processes What should you do?

A.
Enable Binary Authorization, and configure it to attest that no vulnerabilities exist in a container image.
A.
Enable Binary Authorization, and configure it to attest that no vulnerabilities exist in a container image.
Answers
B.
Enable the Container Scanning API in Artifact Registry, and scan the built container images for vulnerabilities.
B.
Enable the Container Scanning API in Artifact Registry, and scan the built container images for vulnerabilities.
Answers
C.
Upload the built container images to your Docker Hub instance, and scan them for vulnerabilities.
C.
Upload the built container images to your Docker Hub instance, and scan them for vulnerabilities.
Answers
D.
Add Artifact Registry to your Aqua Security instance, and scan the built container images for vulnerabilities
D.
Add Artifact Registry to your Aqua Security instance, and scan the built container images for vulnerabilities
Answers
Suggested answer: B

You work on an application that relies on Cloud Spanner as its main datastore. New application features have occasionally caused performance regressions. You want to prevent performance issues by running an automated performance test with Cloud Build for each commit made. If multiple commits are made at the same time, the tests might run concurrently. What should you do?

A.
Create a new project with a random name for every build. Load the required data. Delete the project after the test is run.
A.
Create a new project with a random name for every build. Load the required data. Delete the project after the test is run.
Answers
B.
Create a new Cloud Spanner instance for every build. Load the required data. Delete the Cloud Spanner instance after the test is run.
B.
Create a new Cloud Spanner instance for every build. Load the required data. Delete the Cloud Spanner instance after the test is run.
Answers
C.
Create a project with a Cloud Spanner instance and the required data. Adjust the Cloud Build build file to automatically restore the data to its previous state after the test is run.
C.
Create a project with a Cloud Spanner instance and the required data. Adjust the Cloud Build build file to automatically restore the data to its previous state after the test is run.
Answers
D.
Start the Cloud Spanner emulator locally. Load the required data. Shut down the emulator after the test is run.
D.
Start the Cloud Spanner emulator locally. Load the required data. Shut down the emulator after the test is run.
Answers
Suggested answer: B

Explanation:

Since the testing needs to accommodate scenarios where multiple commits are made simultaneously, and hence multiple tests might run concurrently, the testing environment should support isolated and independent testing instances to avoid interference among tests. Given these requirements, using the Cloud Spanner emulator would not be the best choice for this scenario. The emulator is primarily suited for local development, unit, and integration testing, and is not built for production-scale performance testing. It may not accurately replicate performance characteristics at scale or under load, which are crucial aspects in this case.

You are monitoring a web application that is written in Go and deployed in Google Kubemetes Engine. You notice an increase in CPU and memory utilization. You need to determine which function is consuming the most CPU and memory resources. What should you do?

A.
Import the Cloud Profiler package into your application, and initialize the Profiler agent. Review the generated flame graph in the Google Cloud console to identify time-intensive functions.
A.
Import the Cloud Profiler package into your application, and initialize the Profiler agent. Review the generated flame graph in the Google Cloud console to identify time-intensive functions.
Answers
B.
Create a Cloud Logging query that gathers the web application's logs. Write a Python script that calculates the difference between the timestamps from the beginning and the end of the application's longest functions to identity time-intensive functions.
B.
Create a Cloud Logging query that gathers the web application's logs. Write a Python script that calculates the difference between the timestamps from the beginning and the end of the application's longest functions to identity time-intensive functions.
Answers
C.
Import OpenTelemetry and Trace export packages into your application, and create the trace provider. Review the latency data for your application on the Trace overview page, and identify which functions cause the most latercy.
C.
Import OpenTelemetry and Trace export packages into your application, and create the trace provider. Review the latency data for your application on the Trace overview page, and identify which functions cause the most latercy.
Answers
D.
Add print commands to the application source code to log when each function is called, and redeploy the application.
D.
Add print commands to the application source code to log when each function is called, and redeploy the application.
Answers
Suggested answer: A

Explanation:

Google Cloud Profiler efficiently analyzes cloud-based applications, like those on GKE, using minimal code changes and flame graphs for in-depth insights into CPU and memory usage, thus identifying performance bottlenecks with ease. For more information, visit: https://dev.to/billcchung/profiling-go-grpc-service-with-google-cloud-profiler-1k8l and https://www.cncf.io/blog/2020/03/27/continuous-profiling-go-application-running-in-kubernetes/

You are a developer at a large organization. Your team uses Git for source code management (SCM). You want to ensure that your team follows Google-recommended best practices to manage code to drive higher rates of software delivery. Which SCM process should your team use?

A.
Each group of developers creates a feature branch from the main branch for their work, commits their changes to their branch, and merges their code into the main branch before each major release.
A.
Each group of developers creates a feature branch from the main branch for their work, commits their changes to their branch, and merges their code into the main branch before each major release.
Answers
B.
Each developer commits their code to the main branch before each product release, conducts testing, and rolls back if integration issues are detected.
B.
Each developer commits their code to the main branch before each product release, conducts testing, and rolls back if integration issues are detected.
Answers
C.
Each group of developers copies the repository, commits their changes to their repository, and merges their code into the main repository before each product release.
C.
Each group of developers copies the repository, commits their changes to their repository, and merges their code into the main repository before each product release.
Answers
D.
Each developer creates a branch for their own work, commits their changes to their branch, and merges their code into the main branch after peer review.
D.
Each developer creates a branch for their own work, commits their changes to their branch, and merges their code into the main branch after peer review.
Answers
Suggested answer: D

You are tasked with using C++ to build and deploy a microservice for an application hosted on Google Cloud. The code needs to be containerized and use several custom software libraries that your team has built. You do not want to maintain the underlying infrastructure of the application How should you deploy the microservice?

A.
Use Cloud Functions to deploy the microservice.
A.
Use Cloud Functions to deploy the microservice.
Answers
B.
Use Cloud Build to create the container, and deploy it on Cloud Run.
B.
Use Cloud Build to create the container, and deploy it on Cloud Run.
Answers
C.
Use Cloud Shell to containerize your microservice. and deploy it on GKE Standard.
C.
Use Cloud Shell to containerize your microservice. and deploy it on GKE Standard.
Answers
D.
Use Cloud Shell to containerize your microservice. and deploy it on a Container-Optimized OS Compute Engine instance.
D.
Use Cloud Shell to containerize your microservice. and deploy it on a Container-Optimized OS Compute Engine instance.
Answers
Suggested answer: B
Total 265 questions
Go to page: of 27