Skip to content

Commit

Permalink
Add ns attribute to doQuery
Browse files Browse the repository at this point in the history
(cherry picked from commit 70fa8c4)
  • Loading branch information
ajeetdsouza committed May 25, 2021
1 parent e7fe20d commit 5b77184
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions edgraph/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,11 @@ func (s *Server) doQuery(ctx context.Context, req *Request) (resp *api.Response,

var measurements []ostats.Measurement
ctx, span := otrace.StartSpan(ctx, methodRequest)
ns, err := x.ExtractNamespace(ctx)
if err == nil {
span.AddAttributes(otrace.Int64Attribute("ns", int64(ns)))
}

ctx = x.WithMethod(ctx, methodRequest)
defer func() {
span.End()
Expand Down

0 comments on commit 5b77184

Please sign in to comment.