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

Don't double report metrics on error #2719

Merged
merged 2 commits into from
Mar 25, 2019
Merged

Don't double report metrics on error #2719

merged 2 commits into from
Mar 25, 2019

Conversation

miekg
Copy link
Member

@miekg miekg commented Mar 24, 2019

When there is an error use a different function to report the metrics,
in case the plugin chain handled the request the metrics are already
reported.

Builds up on #2716
Fixes: #2717

Signed-off-by: Miek Gieben miek@miek.nl

@corbot
Copy link

corbot bot commented Mar 24, 2019

Thank you for your contribution. I've just checked the OWNERS files to find a suitable reviewer. This search was successful and I've asked greenpau (via /OWNERS) for a review.

If you have questions or suggestions for this bot, please file an issue against the miekg/dreck repository.

The bot understands the commands that are listed here.

@corbot corbot bot requested a review from greenpau March 24, 2019 18:50
@miekg miekg changed the title <!-- Thank you for contributing to CoreDNS! Please provide the following information to help us make the most of your pull request: --> Don't double report metrics on error Mar 24, 2019
@codecov-io
Copy link

codecov-io commented Mar 25, 2019

Codecov Report

Merging #2719 into master will decrease coverage by 0.03%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2719      +/-   ##
=========================================
- Coverage   55.13%   55.1%   -0.04%     
=========================================
  Files         199     199              
  Lines       10108   10114       +6     
=========================================
  Hits         5573    5573              
- Misses       4119    4125       +6     
  Partials      416     416
Impacted Files Coverage Δ
core/dnsserver/server.go 9.09% <0%> (-0.37%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a8c301...c9e5524. Read the comment docs.

miekg added a commit that referenced this pull request Mar 25, 2019
This was added twice, just leave the server which also holds the
address.

Conflicts with #2719 but should be easy to fix.

Signed-off-by: Miek Gieben <miek@miek.nl>
Copy link
Collaborator

@greenpau greenpau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

yongtang pushed a commit that referenced this pull request Mar 25, 2019
* more

Signed-off-by: Miek Gieben <miek@miek.nl>

* Remove server addr from the context

This was added twice, just leave the server which also holds the
address.

Conflicts with #2719 but should be easy to fix.

Signed-off-by: Miek Gieben <miek@miek.nl>

* doesn't need server context

Signed-off-by: Miek Gieben <miek@miek.nl>
When there is an error use a different function to report the metrics,
in case the plugin chain handled the request the metrics are already
reported.

Fixes: #2717

Signed-off-by: Miek Gieben <miek@miek.nl>
@miekg
Copy link
Member Author

miekg commented Mar 25, 2019

just rebased, merge when ci succeeds.

thanks!

Signed-off-by: Miek Gieben <miek@miek.nl>
@miekg miekg merged commit 93f6350 into master Mar 25, 2019
@corbot corbot bot deleted the reporting branch March 25, 2019 19:04
Jason-ZW pushed a commit to rancher/coredns that referenced this pull request Apr 17, 2019
* more

Signed-off-by: Miek Gieben <miek@miek.nl>

* Remove server addr from the context

This was added twice, just leave the server which also holds the
address.

Conflicts with coredns#2719 but should be easy to fix.

Signed-off-by: Miek Gieben <miek@miek.nl>

* doesn't need server context

Signed-off-by: Miek Gieben <miek@miek.nl>
Jason-ZW pushed a commit to rancher/coredns that referenced this pull request Apr 17, 2019
* Don't double report metrics on error

When there is an error use a different function to report the metrics,
in case the plugin chain handled the request the metrics are already
reported.

Fixes: coredns#2717

Signed-off-by: Miek Gieben <miek@miek.nl>

* Compile again

Signed-off-by: Miek Gieben <miek@miek.nl>
dna2github pushed a commit to dna2fork/coredns that referenced this pull request Jul 19, 2019
* more

Signed-off-by: Miek Gieben <miek@miek.nl>

* Remove server addr from the context

This was added twice, just leave the server which also holds the
address.

Conflicts with coredns#2719 but should be easy to fix.

Signed-off-by: Miek Gieben <miek@miek.nl>

* doesn't need server context

Signed-off-by: Miek Gieben <miek@miek.nl>
dna2github pushed a commit to dna2fork/coredns that referenced this pull request Jul 19, 2019
* Don't double report metrics on error

When there is an error use a different function to report the metrics,
in case the plugin chain handled the request the metrics are already
reported.

Fixes: coredns#2717

Signed-off-by: Miek Gieben <miek@miek.nl>

* Compile again

Signed-off-by: Miek Gieben <miek@miek.nl>
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.

3 participants