Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Commit ba8a0d5

Browse files
authored
server: start root trace span on context creation (#781)
server: start root trace span on context creation
2 parents 5c04d05 + 28b338a commit ba8a0d5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/context.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ func (s *SessionManager) NewContextWithQuery(
8989
s.mu.Unlock()
9090

9191
context := sql.NewContext(
92-
context.Background(),
92+
opentracing.ContextWithSpan(
93+
context.Background(),
94+
s.tracer.StartSpan("query"),
95+
),
9396
sql.WithSession(sess),
9497
sql.WithTracer(s.tracer),
9598
sql.WithPid(s.nextPid()),

0 commit comments

Comments
 (0)