Skip to content

Commit

Permalink
fix metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
blind-oracle committed Sep 20, 2024
1 parent b21ddc8 commit 9b89723
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/tls/cert/providers/issuer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl CertificatesImporter {
http_client: Arc<dyn http::Client>,
mut exporter_url: Url,
poll_interval: Duration,
registry: &Registry,
metrics: Metrics,
) -> Self {
exporter_url.set_path("");
let exporter_url = exporter_url.join("/certificates").unwrap();
Expand All @@ -131,7 +131,7 @@ impl CertificatesImporter {
poll_interval,
snapshot: ArcSwapOption::empty(),
verifier: Verifier(Parser),
metrics: Metrics::new(registry),
metrics,
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/tls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,13 @@ pub async fn setup(

// Create CertIssuer providers
// It's a custom domain & cert provider at the same time.
let issuer_metrics = providers::issuer::Metrics::new(registry);
for v in &cli.cert.cert_provider_issuer_url {
let issuer = Arc::new(providers::Issuer::new(
http_client.clone(),
v.clone(),
cli.cert.cert_provider_issuer_poll_interval,
registry,
issuer_metrics.clone(),
));

cert_providers.push(issuer.clone());
Expand Down

0 comments on commit 9b89723

Please sign in to comment.