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

Added Prometheus stats support for dnsdist #6901

Merged
merged 16 commits into from Sep 3, 2018
Merged

Conversation

@pavel-odintsov
Copy link

@pavel-odintsov pavel-odintsov commented Aug 30, 2018

Short description

My patch based on #6343 prepared by @giganteous

I made number of changes for it:

  • Ported code to current master branch
  • Introduced class which stores meta information about metrics (metric type, description). I do not like idea about mixing atomic counters and meta fields with big text blobs and I divided them
  • Slightly changed code formatting
  • Changed endpoint to /metrics as suggested by @dannyk81
  • Tested code and it works quite well for my case

Checklist

I have:

  • [*] read the CONTRIBUTING.md document
  • [*] compiled this code
  • [*] tested this code
  • [*] included documentation (including possible behaviour changes)
  • [*] documented the code
  • [] added or modified regression test(s)
  • [] added or modified unit test(s)

Thank you!

@pieterlexis pieterlexis requested a review from rgacogne Aug 31, 2018
@pieterlexis pieterlexis added this to the dnsdist-1.4.0 milestone Aug 31, 2018
Copy link
Member

@rgacogne rgacogne left a comment

Thanks a lot for this PR! A few nits but the code looks sane. A test in the test_API part of the regression tests would be nice but is not required for merging.
I'm not really familiar with Prometheus though, perhaps @wojas might have a quick look?

pdns/dnsdist-web.cc Outdated Show resolved Hide resolved
pdns/dnsdist-web.cc Outdated Show resolved Hide resolved
pdns/dnsdist-web.cc Show resolved Hide resolved
pdns/dnsdist-web.cc Outdated Show resolved Hide resolved
pdns/dnsdist-web.cc Outdated Show resolved Hide resolved
pdns/dnsdist.hh Outdated Show resolved Hide resolved
pdns/dnsdist.hh Show resolved Hide resolved
pdns/dnsdist.hh Outdated Show resolved Hide resolved
pdns/dnsdist-web.cc Outdated Show resolved Hide resolved
@pavel-odintsov
Copy link
Author

@pavel-odintsov pavel-odintsov commented Aug 31, 2018

I think I fixed all issues discovered during review.

Copy link
Member

@wojas wojas left a comment

Great work on this PR! I added a few comments, but other than that I think it's good to merge.

We're picky because we care and want to add the same functionality to the recursor in a consistent way. :-)

pdns/dnsdist-web.cc Outdated Show resolved Hide resolved
pdns/dnsdist-web.cc Outdated Show resolved Hide resolved
pdns/dnsdist-web.cc Outdated Show resolved Hide resolved
pdns/dnsdist-web.cc Outdated Show resolved Hide resolved
pdns/dnsdist-web.cc Outdated Show resolved Hide resolved
pdns/dnsdist-web.cc Outdated Show resolved Hide resolved
pdns/dnsdist-web.cc Outdated Show resolved Hide resolved
@pavel-odintsov
Copy link
Author

@pavel-odintsov pavel-odintsov commented Aug 31, 2018

I fixed all issues again. Also, I updated example endpoint output to match new code.

Copy link
Member

@rgacogne rgacogne left a comment

Code looks good, if @wojas is on board with the changes I'd be happy to merge this!

@pavel-odintsov
Copy link
Author

@pavel-odintsov pavel-odintsov commented Aug 31, 2018

Thank you for reviewing it! :)

@wojas
wojas approved these changes Sep 3, 2018
@rgacogne rgacogne merged commit 99a542e into PowerDNS:master Sep 3, 2018
4 checks passed
4 checks passed
LGTM analysis: C/C++ No alert changes
Details
LGTM analysis: JavaScript No alert changes
Details
LGTM analysis: Python No alert changes
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Habbie Habbie mentioned this pull request Sep 3, 2018
3 of 6 tasks complete
@supervacuus supervacuus mentioned this pull request Jun 1, 2020
4 of 7 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.