Remove telemetry calls as we aren't using them
This commit is contained in:
1 parent
051fe60718
commit
9ba1948298
4 files changed
+4
-39
No files matched your search
@@ -296,24 +296,6 @@ func (b *Server) RemovePidFile(pidPath string) error {
|
||||
return os.Remove(pidPath)
|
||||
}
|
||||
|
||||
func (b *Server) SetupMetrics(ui cli.Ui, telemetry *configutil.Telemetry) error {
|
||||
// TODO: Figure out a user-agent we want to use for the last param
|
||||
// TODO: Do we want different names for different components?
|
||||
var err error
|
||||
b.InmemSink, _, b.PrometheusEnabled, err = configutil.SetupTelemetry(&configutil.SetupTelemetryOpts{
|
||||
Config: telemetry,
|
||||
Ui: ui,
|
||||
ServiceName: "boundary",
|
||||
DisplayName: "Boundary",
|
||||
UserAgent: "boundary",
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error initializing telemetry: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *Server) PrintInfo(ui cli.Ui) {
|
||||
verInfo := version.Get()
|
||||
if verInfo.Version != "" {
|
||||
|
||||
@@ -431,11 +431,6 @@ func (c *Command) Run(args []string) int {
|
||||
|
||||
base.StartMemProfiler(c.Logger)
|
||||
|
||||
if err := c.SetupMetrics(c.UI, c.Config.Telemetry); err != nil {
|
||||
c.UI.Error(err.Error())
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
if c.flagRecoveryKey != "" {
|
||||
c.Config.DevRecoveryKey = c.flagRecoveryKey
|
||||
}
|
||||
|
||||
@@ -55,10 +55,6 @@ type Command struct {
|
||||
reloadedCh chan struct{} // for tests
|
||||
startedCh chan struct{} // for tests
|
||||
presetConfig *atomic.String // for tests
|
||||
// for tests -- Prometheus seems to use a global collector so if package
|
||||
// tests are run it errors out even if they're not run in parallel 🙄 cause
|
||||
// Go runs the tests within the same overall process
|
||||
skipMetrics bool
|
||||
}
|
||||
|
||||
func (c *Command) Synopsis() string {
|
||||
@@ -162,13 +158,6 @@ func (c *Command) Run(args []string) int {
|
||||
|
||||
base.StartMemProfiler(c.Logger)
|
||||
|
||||
if !c.skipMetrics {
|
||||
if err := c.SetupMetrics(c.UI, c.Config.Telemetry); err != nil {
|
||||
c.UI.Error(err.Error())
|
||||
return base.CommandUserError
|
||||
}
|
||||
}
|
||||
|
||||
if err := c.SetupKMSes(c.UI, c.Config); err != nil {
|
||||
c.UI.Error(err.Error())
|
||||
return base.CommandUserError
|
||||
|
||||
@@ -22,11 +22,10 @@ func testServerCommand(t *testing.T, controllerKey string) *Command {
|
||||
require := require.New(t)
|
||||
t.Helper()
|
||||
cmd := &Command{
|
||||
Server: base.NewServer(base.NewCommand(cli.NewMockUi())),
|
||||
SighupCh: base.MakeSighupCh(),
|
||||
startedCh: make(chan struct{}),
|
||||
reloadedCh: make(chan struct{}, 5),
|
||||
skipMetrics: true,
|
||||
Server: base.NewServer(base.NewCommand(cli.NewMockUi())),
|
||||
SighupCh: base.MakeSighupCh(),
|
||||
startedCh: make(chan struct{}),
|
||||
reloadedCh: make(chan struct{}, 5),
|
||||
}
|
||||
|
||||
require.NoError(cmd.SetupLogging("trace", "", "", ""))
|
||||
|
||||
Reference in new issue
Block a user