feat(alerting): Plan 03 — UI + backfills (SSRF guard, metrics caching, docker stack) #144
@@ -9,6 +9,7 @@ import io.micrometer.core.instrument.MeterRegistry;
|
||||
import io.micrometer.core.instrument.Timer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -74,6 +75,7 @@ public class AlertingMetrics {
|
||||
* Production constructor: wraps the Postgres-backed gauge suppliers in a
|
||||
* 30-second TTL cache so Prometheus scrapes don't cause per-scrape DB queries.
|
||||
*/
|
||||
@Autowired
|
||||
public AlertingMetrics(MeterRegistry registry, JdbcTemplate jdbc) {
|
||||
this(registry,
|
||||
() -> countRules(jdbc, true),
|
||||
|
||||
Reference in New Issue
Block a user