Skip to content

metrics: register prometheus collectors only if enabled - #1457

Merged
dunglas merged 3 commits into
php:mainfrom
IndraGunawan:perf-metrics-collection
Mar 25, 2025
Merged

metrics: register prometheus collectors only if enabled#1457
dunglas merged 3 commits into
php:mainfrom
IndraGunawan:perf-metrics-collection

Conversation

@IndraGunawan

Copy link
Copy Markdown
Contributor

based on this #1450 PR, i noticed that we do register Prometheus collector even though the user does not define metrics directive in Caddyfile

this PR adds a check if metrics is configured then it will register the Prometheus collector

@IndraGunawan

Copy link
Copy Markdown
ContributorAuthor

fyi @AlliBalliBaba

@IndraGunawanIndraGunawan changed the title metrics/perf: register prometheus metrics only if enabledmetrics/perf: register prometheus collectors only if enabledMar 24, 2025
@IndraGunawanIndraGunawan changed the title metrics/perf: register prometheus collectors only if enabledmetrics: register prometheus collectors only if enabledMar 24, 2025
Comment threadcaddy/caddy.go Outdated
Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>
Comment threadcaddy/caddy.go Outdated
Comment threadtestdata/performance/k6.Caddyfile
Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>
@dunglas
dunglas merged commit 855b3f9 into php:mainMar 25, 2025
@IndraGunawan
IndraGunawan deleted the perf-metrics-collection branch March 25, 2025 11:56
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@IndraGunawan@dunglas@AlliBalliBaba