Your team runs a Java microservice on several Compute Engine VMs. The service already emits application-specific metrics (for example, processed_orders, queue_depth) to a local OTLP gRPC endpoint on port 4317. You need these metrics to appear in Cloud Monitoring dashboards without changing the application code or libraries. Which approach satisfies the requirement with the least operational effort?
Install the OpenTelemetry Collector for Google Cloud (or enable the Ops Agent collector) on each VM, configure an OTLP receiver for localhost:4317, and use the Google Cloud exporter to send the metrics to Cloud Monitoring.
Enable the Cloud Trace API for the project; OTLP metrics will automatically be imported and shown in Cloud Monitoring.
Create a Cloud Monitoring dashboard with custom charts and use gcloud monitoring dashboards import to pull data from the OTLP endpoint.
Deploy a Pub/Sub sidecar that subscribes to the OTLP port and republishes the data; configure a log sink to forward the messages to Cloud Monitoring.
The simplest path is to deploy the OpenTelemetry Collector for Google Cloud (or configure the Ops Agent's embedded collector) on each VM. The collector is pointed at the local OTLP receiver and uses the Google Cloud exporter to push the data to Cloud Monitoring, where the time series are stored as custom metrics. Enabling Cloud Trace does not surface OTLP metrics, a Pub/Sub agent has no built-in Monitoring exporter, and creating a dashboard alone cannot ingest data.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the OpenTelemetry Collector and its role in this setup?
Open an interactive chat with Bash
What is the Ops Agent, and how does it assist in sending metrics to Cloud Monitoring?
Open an interactive chat with Bash
What does the term 'OTLP gRPC endpoint' mean, and why is it important?
Open an interactive chat with Bash
What is OpenTelemetry Collector and what role does it play in collecting metrics?
Open an interactive chat with Bash
What is the role of the Ops Agent embedded collector, and how does it differ from the standalone OpenTelemetry Collector?
Open an interactive chat with Bash
What is OTLP and why is it used for metrics collection in this setup?
Open an interactive chat with Bash
GCP Associate Cloud Engineer
Ensuring successful operation of a cloud solution
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .