Skip to content

Commit

Permalink
enhance: Support to trace restful request and request error (#28685)
Browse files Browse the repository at this point in the history
issue: #28348

Signed-off-by: SimFG <[email protected]>
  • Loading branch information
SimFG authored Nov 27, 2023
1 parent eaabe02 commit 9c46788
Show file tree
Hide file tree
Showing 12 changed files with 509 additions and 207 deletions.
6 changes: 5 additions & 1 deletion internal/distributed/proxy/httpserver/handler.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package httpserver

import (
"context"
"fmt"

"github.com/gin-gonic/gin"
Expand All @@ -10,9 +11,12 @@ import (
"github.com/milvus-io/milvus/internal/types"
)

type RestRequestInterceptor func(ctx context.Context, ginCtx *gin.Context, req any, handler func(reqCtx context.Context, req any) (any, error)) (any, error)

// Handlers handles http requests
type Handlers struct {
proxy types.ProxyComponent
proxy types.ProxyComponent
interceptors []RestRequestInterceptor
}

// NewHandlers creates a new Handlers
Expand Down
Loading

0 comments on commit 9c46788

Please sign in to comment.