internal/lsp: add tracing to the didOpen call
We only had the tracing on didChange before this Change-Id: Iadec8a43d439931bf58925f149a1d32b3ae29c36 Reviewed-on: https://go-review.googlesource.com/c/tools/+/186199 Run-TryBot: Ian Cottrell <iancottrell@google.com> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This commit is contained in:
parent
919acb9f1f
commit
0b5a7f81db
|
@ -31,6 +31,8 @@ func (s *Server) didOpen(ctx context.Context, params *protocol.DidOpenTextDocume
|
|||
view := s.session.ViewOf(uri)
|
||||
go func() {
|
||||
ctx := view.BackgroundContext()
|
||||
ctx, done := trace.StartSpan(ctx, "lsp:background-worker")
|
||||
defer done()
|
||||
s.Diagnostics(ctx, view, uri)
|
||||
}()
|
||||
return nil
|
||||
|
@ -69,7 +71,6 @@ func (s *Server) didChange(ctx context.Context, params *protocol.DidChangeTextDo
|
|||
// Run diagnostics on the newly-changed file.
|
||||
go func() {
|
||||
ctx := view.BackgroundContext()
|
||||
//TODO: connect the remote span?
|
||||
ctx, done := trace.StartSpan(ctx, "lsp:background-worker")
|
||||
defer done()
|
||||
s.Diagnostics(ctx, view, uri)
|
||||
|
|
Loading…
Reference in New Issue