Interview Prep/Monitoring & Observability/Prometheus and PromQL at Scale

A third-party exporter emits 40,000 series you never use. How do you drop them at ingest?

IntermediateScenarioPrometheus and PromQL at Scale
Answer

Situation read → You are paying memory and storage for series nobody queries. Drop them after scrape, before storage.

What I'd do →

  1. Use metric_relabel_configs, which runs on scraped samples.
metric_relabel_configs:
  - source_labels: [__name__]
    regex: "go_gc_.*|http_request_size_bytes_.*|unused_metric_.*"
    action: drop
  - regex: "pod_template_hash|controller_revision_hash"
    action: labeldrop
  1. Verify with prometheus_target_scrape_pool_... and scrape_samples_post_metric_relabeling.
  2. Prefer an allowlist (action: keep) for noisy exporters.
  3. Confirm no dashboards or alerts use the dropped names first.

Why → Dropping in relabeling is cheaper than storing and ignoring.

Interview tip → relabel_configs is for targets, metric_relabel_configs is for samples, a favorite quiz question.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Prometheus and PromQL at Scale