add metrics and tracing

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-04-23 22:21:27 +03:00
parent 1c36c1685f
commit c81960af51
7 changed files with 205 additions and 22 deletions

View File

@@ -69,7 +69,7 @@ func getRspHeader(ctx context.Context) http.Header {
// GetRspCode used internally by generated http server handler
func GetRspCode(ctx context.Context) int {
var code int
code := int(200)
if rsp, ok := ctx.Value(rspCodeKey{}).(*rspCodeVal); ok {
code = rsp.code
}