Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Associate Cloud Engineer practice bank has an additional 2,014 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your team is developing an application running on Google Cloud and needs to record custom application-level telemetry directly into Cloud Monitoring using the Google Cloud client library.
You must define the schema for a new metric named custom.googleapis.com/retail/store_sales that tracks monetary sale amounts as 64-bit floating-point numbers and allows filtering and grouping by a store identifier.
Which configuration should you define on the MetricDescriptor object before creating it via the MetricServiceClient?
MonitoredResourceDescriptor with type gce_instance and embed the store_id and monetary values directly inside its resource label schema.A MonitoredResourceDescriptor describes a monitored resource type—such as a Compute Engine virtual machine (gce_instance), a Cloud SQL database instance, or a Kubernetes pod. It defines the identity and environment of the infrastructure component where measurements originate, rather than what is measured.
MetricDescriptor.gce_instance resource type is managed by Google Cloud and cannot be customized with arbitrary application-level metric fields or business dimensions like store_id.You needed to inspect or define a custom infrastructure resource target entity rather than defining a custom application-level metric schema.
In Cloud Monitoring, every time series represents the intersection of a MetricDescriptor (what is measured) and a MonitoredResource (where it was measured).
custom.googleapis.com/retail/store_sales, specify valueType as DOUBLE, set metricKind to GAUGE, and attach a LabelDescriptor with key store_id.A MetricDescriptor is the schema definition in Cloud Monitoring that specifies the metadata and structure for a metric. It defines the formal identifier (metric type), the operational nature of measurements (metric kind), the data format of values (value type), and any dimensional attributes (labels) used for grouping and filtering time series.
type to custom.googleapis.com/retail/store_sales establishes a valid user-defined custom metric path within the Google Cloud domain.valueType as DOUBLE correctly accommodates 64-bit floating-point numbers, suitable for representing exact monetary amounts with fractional currency.metricKind to GAUGE records instantaneous values at specific sampling points in time.LabelDescriptor with key: "store_id" and valueType: STRING allows individual stores to partition the data into distinct time series, enabling granular queries, dashboards, and alert filters.MetricServiceClient calls.Using the MetricDescriptor object within the Cloud Monitoring API ensures that custom metrics are registered correctly with appropriate value types and labels before or during time-series ingestion. This provides predictable typing and allows metric data to be sliced and diced accurately across application components.
custom.googleapis.com/retail/store_sales and let Cloud Monitoring auto-detect the schema without descriptors.Cloud Pub/Sub is an asynchronous, scalable messaging and event-ingestion service that decouples publishers from subscribers. It delivers message payloads across distributed systems.
custom.googleapis.com/ to define metric schemas.GAUGE, DELTA) or label schemas from unstructured Pub/Sub topic names.MetricServiceClient and MetricDescriptor API objects entirely.The application needed to ingest high-throughput asynchronous event messages for consumption by multiple decoupled backend worker microservices.
To send application telemetry directly to Cloud Monitoring, applications must write time-series data using the Cloud Monitoring API (MetricServiceClient.createTimeSeries) or use standardized telemetry agents.
A Log Sink in Cloud Logging is an export mechanism that routes log entries matching an inclusion filter to supported destinations, such as Cloud Storage, BigQuery, Cloud Pub/Sub, or another log bucket.
MetricDescriptor or write structured time-series metrics into Cloud Monitoring.MetricServiceClient or MetricDescriptor objects.The requirement was to retain application audit logs or long-term historical records in cold storage for compliance purposes.
While Cloud Logging can generate metrics via log-based metrics, this is configured in Cloud Logging based on log parsing, rather than directly instantiating metric descriptors via the Monitoring API client library.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated