Skip to content

Commit 542909f

Browse files
committed
internal/lsp/cmd: partially revert "add a flag to disable telemetry"
This reverts commit 17a19b5. The revert is partial because that change also added the -short flag when running govim tests, which we preserve as without this the tests often time-out (and I don't want to increase our test timeout right now). Reason for revert: telemetry races have been fixed in https://golang.org/cl/226317 Change-Id: I5fcf034c1fe6e2db48994e2f06b73a593c779e54 Reviewed-on: https://go-review.googlesource.com/c/tools/+/231637 Run-TryBot: Robert Findley <[email protected]> Reviewed-by: Rebecca Stambler <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 2658dc0 commit 542909f

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

gopls/integration/govim/run_tests_for_cloudbuild.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
# build step. We do this so that we can capture govim test artifacts regardless
1010
# of the test results.
1111

12-
# See golang.org/issues/38042. Temporarily disable telemetry until event
13-
# exporters are threadsafe.
14-
export GOVIM_GOPLS_FLAGS="-telemetry.disable"
15-
1612
# Substitute the locally built gopls binary for use in govim integration tests.
1713
go test -short ./cmd/govim -gopls /workspace/gopls/gopls
1814

internal/lsp/cmd/serve.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"strings"
1313
"time"
1414

15-
"golang.org/x/tools/internal/event"
1615
"golang.org/x/tools/internal/jsonrpc2"
1716
"golang.org/x/tools/internal/lsp/cache"
1817
"golang.org/x/tools/internal/lsp/debug"
@@ -35,7 +34,6 @@ type Serve struct {
3534
RemoteListenTimeout time.Duration `flag:"remote.listen.timeout" help:"when used with -remote=auto, the listen.timeout used when auto-starting the remote"`
3635
RemoteDebug string `flag:"remote.debug" help:"when used with -remote=auto, the debug address used when auto-starting the remote"`
3736
RemoteLogfile string `flag:"remote.logfile" help:"when used with -remote=auto, the filename for the remote daemon to log to"`
38-
DisableExport bool `flag:"telemetry.disable" help:"TEMPORARY WORKAROUND: disable telemetry processing entirely. This flag will be removed in the future, once telemetry issues are resolved."`
3937

4038
app *Application
4139
}
@@ -62,12 +60,6 @@ func (s *Serve) Run(ctx context.Context, args ...string) error {
6260
return tool.CommandLineErrorf("server does not take arguments, got %v", args)
6361
}
6462

65-
// Temporary workaround for golang.org/issues/38042: allow disabling
66-
// telemetry export.
67-
if s.DisableExport {
68-
event.SetExporter(nil)
69-
}
70-
7163
di := debug.GetInstance(ctx)
7264
if di != nil {
7365
closeLog, err := di.SetLogFile(s.Logfile)

0 commit comments

Comments
 (0)