|
|
@ -8,6 +8,7 @@ import ( |
|
|
|
"github.com/go-kratos/kratos/v2/middleware" |
|
|
|
"github.com/go-kratos/kratos/v2/middleware" |
|
|
|
"github.com/go-kratos/kratos/v2/middleware/logging" |
|
|
|
"github.com/go-kratos/kratos/v2/middleware/logging" |
|
|
|
"github.com/go-kratos/kratos/v2/middleware/recovery" |
|
|
|
"github.com/go-kratos/kratos/v2/middleware/recovery" |
|
|
|
|
|
|
|
"github.com/go-kratos/kratos/v2/middleware/status" |
|
|
|
"github.com/go-kratos/kratos/v2/middleware/tracing" |
|
|
|
"github.com/go-kratos/kratos/v2/middleware/tracing" |
|
|
|
"github.com/go-kratos/kratos/v2/transport/http" |
|
|
|
"github.com/go-kratos/kratos/v2/transport/http" |
|
|
|
"go.opentelemetry.io/otel/trace" |
|
|
|
"go.opentelemetry.io/otel/trace" |
|
|
@ -27,6 +28,7 @@ func NewHTTPServer(c *conf.Server, tracer trace.TracerProvider, blog *service.Bl |
|
|
|
} |
|
|
|
} |
|
|
|
m := http.Middleware( |
|
|
|
m := http.Middleware( |
|
|
|
middleware.Chain( |
|
|
|
middleware.Chain( |
|
|
|
|
|
|
|
status.Server(), |
|
|
|
tracing.Server(tracing.WithTracerProvider(tracer)), |
|
|
|
tracing.Server(tracing.WithTracerProvider(tracer)), |
|
|
|
logging.Server(log.DefaultLogger), |
|
|
|
logging.Server(log.DefaultLogger), |
|
|
|
recovery.Recovery(), |
|
|
|
recovery.Recovery(), |
|
|
|