Skip to content

Commit

Permalink
Add ns attribute to doQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
ajeetdsouza committed May 25, 2021
1 parent ee382a4 commit 70fa8c4
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 @@ -1331,6 +1331,11 @@ func (s *Server) doQuery(ctx context.Context, req *Request) (

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 70fa8c4

Please sign in to comment.