[#498] middleware: Add spans to detail the trace

Spans are added only to the following middleware:
* PolicyCheck
* Auth
* FrostfsIDValidation

This is done this way because these middleware are basic and
they interact with frostfs-storage.

Also, an explicit context has been added to many functions
so that the middleware spans do not include all subsequent spans.

Signed-off-by: Roman Loginov <r.loginov@yadro.com>
This commit is contained in:
Roman Loginov 2024-11-25 16:28:18 +03:00
parent c2c062b778
commit ac0140506c
6 changed files with 51 additions and 33 deletions

View file

@ -45,7 +45,7 @@ type centerMock struct {
key *keys.PrivateKey
}
func (c *centerMock) Authenticate(*http.Request) (*middleware.Box, error) {
func (c *centerMock) Authenticate(context.Context, *http.Request) (*middleware.Box, error) {
if c.noAuthHeader {
return nil, middleware.ErrNoAuthorizationHeader
}