motiv-labs / janus

An API Gateway written in Go
https://hellofresh.gitbooks.io/janus
MIT License
2.78k stars 318 forks source link

Add request-id to error handler logs #381

Closed vgarvardt closed 5 years ago

vgarvardt commented 5 years ago

What does this PR do?

Adds request-id to errors handler to make it easier to track source of error like no API found with those values.

codecov[bot] commented 5 years ago

Codecov Report

Merging #381 into master will increase coverage by 0.06%. The diff coverage is 30.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #381      +/-   ##
==========================================
+ Coverage   40.25%   40.32%   +0.06%     
==========================================
  Files          75       75              
  Lines        2631     2624       -7     
==========================================
- Hits         1059     1058       -1     
+ Misses       1510     1506       -4     
+ Partials       62       60       -2
Impacted Files Coverage Δ
pkg/middleware/request_id.go 0% <0%> (-12.5%) :arrow_down:
pkg/proxy/reverse_proxy.go 0% <0%> (ø) :arrow_up:
pkg/web/api_handler.go 0% <0%> (ø) :arrow_up:
pkg/plugin/oauth2/handlers.go 0% <0%> (ø) :arrow_up:
pkg/plugin/basic/handler.go 9.09% <0%> (ø) :arrow_up:
pkg/plugin/oauth2/middleware.go 100% <100%> (ø) :arrow_up:
pkg/plugin/bodylmt/middleware.go 83.33% <100%> (ø) :arrow_up:
pkg/plugin/retry/middleware.go 93.1% <100%> (ø) :arrow_up:
pkg/plugin/cb/middleware.go 93.54% <100%> (ø) :arrow_up:
pkg/middleware/host_matcher.go 100% <100%> (ø) :arrow_up:
... and 3 more

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 f74652c...33b99eb. Read the comment docs.