PCA (Prometheus Certified Associate) sample exam question with answer 344

Question:
How are labels attached to scraped time series in Prometheus?

  1. Automatically by Prometheus based on the instance being scraped
  2. Manually by the user configuring the Prometheus scrape
  3. By a separate service discovery mechanism that provides labels
  4. Labels are not attached to scraped time series in Prometheus
Answer:
A - correct answer. When Prometheus scrapes a target, it attaches some labels automatically to the scraped time series to identify the scraped target, including the job name and instance ID. If these labels are already present in the scraped data, the behavior depends on the honor_labels configuration option