Cần cho Prometheus scrape metrics. Đã thêm micrometer-registry-prometheus. Cấu hình nào đủ và an toàn nhất?
Xem đáp án và giải thích
Thêm micrometer-registry-prometheus thì Boot tạo PrometheusMeterRegistry và endpoint prometheus, nhưng endpoint vẫn phải được expose. Sau đó Prometheus scrape GET /actuator/prometheus theo định dạng text exposition. Thực tế nên chạy actuator ở management.server.port riêng để chỉ mạng nội bộ truy cập được.