Skip to content

Commit

Permalink
fix: minor code fix up
Browse files Browse the repository at this point in the history
  • Loading branch information
liufuyang committed Oct 26, 2023
1 parent 72a4588 commit 0fecb46
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,13 @@ func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor {
grpcStatusCode = s.Code()
statusCode, msg := serverStatus(s)
span.SetStatus(statusCode, msg)
span.SetAttributes(statusCodeAttr(s.Code()))
span.SetAttributes(statusCodeAttr(grpcStatusCode))
if cfg.SentEvent {
messageSent.Event(ctx, 1, s.Proto())
}
} else {
grpcStatusCode = grpc_codes.OK
span.SetAttributes(statusCodeAttr(grpc_codes.OK))
span.SetAttributes(statusCodeAttr(grpcStatusCode))
if cfg.SentEvent {
messageSent.Event(ctx, 1, resp)
}
Expand Down

0 comments on commit 0fecb46

Please sign in to comment.