Skip to content

Commit

Permalink
fix: minor fix for easier reading
Browse files Browse the repository at this point in the history
  • Loading branch information
liufuyang committed Oct 26, 2023
1 parent 0bf1d59 commit 72a4588
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,8 @@ func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor {
}

elapsedTime := time.Since(before).Milliseconds()
attr = append(attr, semconv.RPCGRPCStatusCodeKey.Int64(int64(grpcStatusCode)))
o := metric.WithAttributes(attr...)
cfg.rpcServerDuration.Record(ctx, elapsedTime, o)
attr = append(attr, statusCodeAttr(grpcStatusCode))
cfg.rpcServerDuration.Record(ctx, elapsedTime, metric.WithAttributes(attr...))

return resp, err
}
Expand Down

0 comments on commit 72a4588

Please sign in to comment.