In Prometheus, service discovery is the automated procedure for dynamically finding and tracking instances of targets or services. Service discovery allows Prometheus to regularly see and add new targets, eliminating old ones to guarantee thorough and current infrastructure monitoring.