forked from mtusi2026/mtusi2026lab6
Добавить наблюдаемость и проверки отказов для ЛР 6
This commit is contained in:
@@ -82,10 +82,7 @@ func NewRouterWithCache(
|
||||
root.HandleFunc("GET /health/ready", handleHealthReady(pool, o.Redis, o.Blobs, o.Draining))
|
||||
root.Handle("/", concurrencyMiddleware(s.Limiter, apiMux))
|
||||
|
||||
var h http.Handler = root
|
||||
h = loggingMiddleware(h)
|
||||
h = instanceMiddleware(o.InstanceID, h)
|
||||
return h
|
||||
return instanceMiddleware(o.InstanceID, observeRequests(root, apiMux))
|
||||
}
|
||||
|
||||
func instanceMiddleware(id string, next http.Handler) http.Handler {
|
||||
|
||||
Reference in New Issue
Block a user