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

Prometheus middleware should not call c.Error() as it causes double error logging #56

Merged
merged 1 commit into from Jun 1, 2021

Conversation

aldas
Copy link
Contributor

@aldas aldas commented Jun 1, 2021

  • Prometheus middleware should not call c.Error() as it causes double error logging.
  • Handle status code properly when next returns an error

…rror logging.

Handle status code properly when next returns an error
@codecov
Copy link

codecov bot commented Jun 1, 2021

Codecov Report

Merging #56 (fa54e74) into master (063b8fd) will increase coverage by 0.14%.
The diff coverage is 88.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #56      +/-   ##
==========================================
+ Coverage   55.62%   55.77%   +0.14%     
==========================================
  Files           8        8              
  Lines         453      459       +6     
==========================================
+ Hits          252      256       +4     
- Misses        182      183       +1     
- Partials       19       20       +1     
Impacted Files Coverage Δ
prometheus/prometheus.go 50.28% <88.23%> (+0.57%) ⬆️

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 063b8fd...fa54e74. Read the comment docs.

@aldas aldas merged commit b7e53bc into labstack:master Jun 1, 2021
FloThinksPi pushed a commit to cloudfoundry/go-cf-api that referenced this pull request Dec 8, 2021
We ran into a bug where the Prometheus middleware was calling c.Error
and causing double entry into our error handler function. This was fixed
by labstack/echo-contrib#56 which is part of
v0.11.0 so upgrading fixes it
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