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>
diff --git a/internal/lsp/text_synchronization.go b/internal/lsp/text_synchronization.go
index fb7608d..6544010 100644
--- a/internal/lsp/text_synchronization.go
+++ b/internal/lsp/text_synchronization.go
@@ -31,6 +31,8 @@
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 @@
// 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)