What are `job` and `instance` labels and where do they come from?

BeginnerConceptPrometheus Architecture
Answer

Prometheus attaches them to every scraped series: job is the job_name from the scrape config, and instance is the host:port of the target (from __address__). Together they identify where a series came from.

If the exposed metrics already carry a job or instance label, Prometheus renames them to exported_job / exported_instance unless honor_labels: true is set (used for Pushgateway and federation).

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Prometheus Architecture