Skip to content

Commit

Permalink
internal/lsp/cmd: partially revert "add a flag to disable telemetry"
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
findleyr committed May 1, 2020
1 parent 2658dc0 commit 542909f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions gopls/integration/govim/run_tests_for_cloudbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
# build step. We do this so that we can capture govim test artifacts regardless
# of the test results.

# See golang.org/issues/38042. Temporarily disable telemetry until event
# exporters are threadsafe.
export GOVIM_GOPLS_FLAGS="-telemetry.disable"

# Substitute the locally built gopls binary for use in govim integration tests.
go test -short ./cmd/govim -gopls /workspace/gopls/gopls

Expand Down
8 changes: 0 additions & 8 deletions internal/lsp/cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"strings"
"time"

"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/jsonrpc2"
"golang.org/x/tools/internal/lsp/cache"
"golang.org/x/tools/internal/lsp/debug"
Expand All @@ -35,7 +34,6 @@ type Serve struct {
RemoteListenTimeout time.Duration `flag:"remote.listen.timeout" help:"when used with -remote=auto, the listen.timeout used when auto-starting the remote"`
RemoteDebug string `flag:"remote.debug" help:"when used with -remote=auto, the debug address used when auto-starting the remote"`
RemoteLogfile string `flag:"remote.logfile" help:"when used with -remote=auto, the filename for the remote daemon to log to"`
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."`

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

// Temporary workaround for golang.org/issues/38042: allow disabling
// telemetry export.
if s.DisableExport {
event.SetExporter(nil)
}

di := debug.GetInstance(ctx)
if di != nil {
closeLog, err := di.SetLogFile(s.Logfile)
Expand Down

0 comments on commit 542909f

Please sign in to comment.