1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-03-17 21:07:54 +02:00

example/blog: enhance ctx (#887)

This commit is contained in:
miya 2021-04-29 09:06:13 -05:00 committed by GitHub
parent 83eba7083a
commit f81f95cbbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,7 @@ func (s *BlogService) DeleteArticle(ctx context.Context, req *pb.DeleteArticleRe
func (s *BlogService) GetArticle(ctx context.Context, req *pb.GetArticleRequest) (*pb.GetArticleReply, error) {
tr := otel.Tracer("api")
_, span := tr.Start(ctx, "GetArticle")
ctx, span := tr.Start(ctx, "GetArticle")
defer span.End()
p, err := s.article.Get(ctx, req.Id)
if err != nil {