|
|
@ -54,7 +54,8 @@ func recordUptime() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func Prometheus(handler middleware.Handler) middleware.Handler { |
|
|
|
func Prometheus(handler middleware.Handler) middleware.Middleware { |
|
|
|
|
|
|
|
return func(handler middleware.Handler) middleware.Handler { |
|
|
|
return func(ctx context.Context, a any) (any, error) { |
|
|
|
return func(ctx context.Context, a any) (any, error) { |
|
|
|
tr, ok := transport.FromServerContext(ctx) |
|
|
|
tr, ok := transport.FromServerContext(ctx) |
|
|
|
if !ok { |
|
|
|
if !ok { |
|
|
@ -79,3 +80,4 @@ func Prometheus(handler middleware.Handler) middleware.Handler { |
|
|
|
return resp, err |
|
|
|
return resp, err |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|