Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Prometheus Metrics Support #116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

tpaulus
Copy link

@tpaulus tpaulus commented Sep 4, 2023

This change adds support for configuring a Prometheus Server to provide metrics into both the number of domains on the block list, as well as the number of blocks/allows served by the DNS Resolver.

I wasn't able to get the Perf Benchmark running, but would expect this to have little impact since the metrics emission and logging are done in background threads.

@tpaulus tpaulus reopened this Nov 22, 2023
@@ -57,6 +58,15 @@
return blockCache, apiServer, nil
}

func serveMetrics(addr string) {
http.Handle("/metrics", promhttp.Handler())
err := http.ListenAndServe(addr, nil)

Check failure

Code scanning / Golang security checks by gosec

Use of net/http serve function that has no support for setting timeouts Error

Use of net/http serve function that has no support for setting timeouts
Sign up for free to 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.

None yet

1 participant