grafana/pkg/middleware
Marcus Efraimsson caa420f92f
Chore: Improve request distributed tracing middleware (#33033)
Before these changes the request tracing was added for each route 
registered using the routing.RouteRegister, see code. This had the 
consequence that middleware executed earlier/later in the request 
pipeline was not part of the request tracing middleware life-cycle 
which measures the duration of requests among other things.
In the logger middleware we do extract the current distributed trace 
identifier, if available, and set that on request info/error log messages.
With these changes we can extract the current distributed trace identifier, 
if available, and set that on the contextual HTTP request logger 
(models.ReqContext.Logger) which would improve the possibility to correlate 
all HTTP request log messages with traces.
In addition, the request tracing middleware is now executed first and last in 
the request pipeline and should therefore result in more accurate timing 
measurements (request duration).

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-04-20 15:22:22 +02:00
..
cookies Backend: Remove more globals (#29644) 2020-12-15 19:09:04 +01:00
auth_test.go Profile: Fixes profile preferences being accessible when anonymous access was enabled (#31516) 2021-02-27 18:04:28 +01:00
auth.go Auth: Allow soft token revocation (#31601) 2021-03-16 17:44:02 +01:00
csp.go Chore: remove CSP debug logging line (#30689) 2021-01-27 13:31:41 -08:00
dashboard_redirect_test.go Backend: Remove more globals (#29644) 2020-12-15 19:09:04 +01:00
dashboard_redirect.go Backend: Remove more globals (#29644) 2020-12-15 19:09:04 +01:00
gziper.go live: fix writing headers in hijacked connection with gzip enabled (#32310) 2021-03-25 21:36:52 +03:00
logger.go Move middleware context handler logic to service (#29605) 2020-12-11 11:44:44 +01:00
middleware_basic_auth_test.go Move middleware context handler logic to service (#29605) 2020-12-11 11:44:44 +01:00
middleware_jwt_auth_test.go Auth: support JWT Authentication (#29995) 2021-03-31 08:40:44 -07:00
middleware_test.go Auth: support JWT Authentication (#29995) 2021-03-31 08:40:44 -07:00
middleware.go Profile: Fixes profile preferences being accessible when anonymous access was enabled (#31516) 2021-02-27 18:04:28 +01:00
org_redirect_test.go middleware: Make scenario test functions take a testing.T argument (#29564) 2020-12-04 11:09:32 +01:00
org_redirect.go Backend: Remove more globals (#29644) 2020-12-15 19:09:04 +01:00
quota_test.go Backend: Remove more globals (#29644) 2020-12-15 19:09:04 +01:00
quota.go Backend: Remove more globals (#29644) 2020-12-15 19:09:04 +01:00
rate_limit_test.go Move middleware context handler logic to service (#29605) 2020-12-11 11:44:44 +01:00
rate_limit.go Logging: rate limit fronted logging endpoint (#29272) 2020-12-09 16:22:24 +01:00
recovery_test.go Backend: Remove more globals (#29644) 2020-12-15 19:09:04 +01:00
recovery.go Backend: Migrate to using non-global configuration (#31856) 2021-03-10 12:41:29 +01:00
request_metrics.go instrumentation: align label name with our other projects (#29514) 2020-12-08 14:26:07 +01:00
request_tracing.go Chore: Improve request distributed tracing middleware (#33033) 2021-04-20 15:22:22 +02:00
testing.go Auth: support JWT Authentication (#29995) 2021-03-31 08:40:44 -07:00
validate_host.go Backend: Remove more globals (#29644) 2020-12-15 19:09:04 +01:00