From 8dc92ef8b49eb793187d41c67c07585c9b789166 Mon Sep 17 00:00:00 2001 From: opensite Date: Wed, 28 Apr 2021 14:31:23 +0800 Subject: [PATCH] examples/blog:keep the grpc and http error consistent (#873) --- examples/blog/internal/server/http.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/blog/internal/server/http.go b/examples/blog/internal/server/http.go index c991bab1c..68f4a5913 100644 --- a/examples/blog/internal/server/http.go +++ b/examples/blog/internal/server/http.go @@ -8,6 +8,7 @@ import ( "github.com/go-kratos/kratos/v2/middleware" "github.com/go-kratos/kratos/v2/middleware/logging" "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/transport/http" "go.opentelemetry.io/otel/trace" @@ -27,6 +28,7 @@ func NewHTTPServer(c *conf.Server, tracer trace.TracerProvider, blog *service.Bl } m := http.Middleware( middleware.Chain( + status.Server(), tracing.Server(tracing.WithTracerProvider(tracer)), logging.Server(log.DefaultLogger), recovery.Recovery(),