← PCA hub

PCA — Instrumentation and Exporters

16% of the PCA exam. Sample questions below; the full library has 22 questions tagged to this domain.

Sample questions on Instrumentation and Exporters

Instrumentation and Exporters

Q1. Which of the following labels is the most dangerous from a cardinality perspective and should generally be avoided in instrumentation?

Reveal answer and explanations
  1. A `method` with values like `GET`, `POST`, `PUT`, `DELETE`

    Incorrect. HTTP methods are low-cardinality (a handful of values); safe to label on.

  2. B `status_code` using HTTP status classes like `2xx`, `4xx`, `5xx`

    Incorrect. Status classes are bounded and low-cardinality.

  3. C `environment` like `prod`, `staging`, `dev`

    Incorrect. Environment values are typically a small fixed set.

  4. D `user_id` per-request

    Correct. Unbounded identifiers like `user_id`, `request_id`, or full URLs explode series count, inflate memory, and can destabilize Prometheus — instrument with bounded labels only.

Instrumentation and Exporters

Q2. In OpenMetrics, a counter named `requests` must be exposed with which suffix on its primary series?

Reveal answer and explanations
  1. A `_count`

    Incorrect. `_count` is the suffix used for histogram and summary count series, not counters themselves.

  2. B `_total`

    Correct. OpenMetrics requires counters to use the `_total` suffix on their primary series (so a counter named `requests` is exposed as `requests_total`).

  3. C `_created`

    Incorrect. `_created` is an OpenMetrics auxiliary series carrying the counter creation timestamp, not the primary counter series.

  4. D No suffix is required; the `# TYPE counter` comment alone marks it

    Incorrect. OpenMetrics explicitly requires the `_total` suffix for counters even when the type comment is present.

Instrumentation and Exporters

Q3. By convention, on which HTTP path does a Prometheus-compatible target expose its metrics?

Reveal answer and explanations
  1. A `/prometheus`

    Incorrect. `/prometheus` is not the convention and can conflict with reverse proxy paths.

  2. B `/metrics`

    Correct. Client libraries, exporters, and third-party integrations default to `/metrics` unless `metrics_path` is overridden in the scrape config.

  3. C `/telemetry`

    Incorrect. `/telemetry` is not the Prometheus convention.

  4. D `/stats`

    Incorrect. `/stats` is conventional in other stacks such as Envoy or HAProxy, not Prometheus.

Instrumentation and Exporters

Q4. Your application exposes a counter `jobs_processed_total`. The process is routinely restarted during deploys, which resets the counter to zero. Which PromQL idiom correctly accounts for these restarts when computing long-term throughput?

Reveal answer and explanations
  1. A Use `rate(jobs_processed_total[1h])`, which natively detects counter resets and compensates across them

    Correct. `rate()` and `increase()` are designed to detect drops in counter values as resets and compensate, yielding correct throughput across process restarts.

  2. B Use `delta(jobs_processed_total[1h])`, which treats all samples as gauges

    Incorrect. `delta()` is for gauges and does not handle counter resets; using it on a counter gives incorrect results after a restart.

  3. C Manually subtract the value at the last scrape from the first without using any function

    Incorrect. Manual subtraction does not handle resets and produces negative or nonsensical values after restarts.

  4. D Replace the counter with a gauge that is incremented externally to avoid resets

    Incorrect. Incrementing a gauge externally loses the process-local counter semantics and is not a recommended instrumentation pattern.

Instrumentation and Exporters

Q5. Which statement about the Prometheus exposition format is correct?

Reveal answer and explanations
  1. A A binary Protobuf-only format that is not human-readable and requires decoders for inspection during debugging

    Incorrect. While Protobuf was historically supported, the primary and widely adopted format is plain text; OpenMetrics extends the text format.

  2. B Line-based plain text: `metric{labels} value [timestamp]`

    Correct. The text exposition format is line-oriented with `HELP` and `TYPE` comments plus one sample per line; OpenMetrics is a superset carrying the same shape.

  3. C A JSON document with nested objects per metric, with labels as keys in a sub-object per series in the array output

    Incorrect. JSON is not a supported exposition format for Prometheus.

  4. D An XML document following the OpenMetrics XML schema with HELP and TYPE as element attributes on each entry node

    Incorrect. XML is not used; OpenMetrics is text-based.

Drill Instrumentation and Exporters with the full bankDomain Drill mode targets your weak areas — paid feature

How this domain is tested

Instrumentation and Exporters accounts for 16% of the PCA exam. Expect questions that test recall of terminology and the ability to read short scenarios — not deep configuration. Use the sample questions above as difficulty calibration; if any feel hard, the rest of our 22-question domain bank will close those gaps.