diff --git a/internal/install/command.go b/internal/install/command.go index 453d9d5cf..bcc1d834e 100644 --- a/internal/install/command.go +++ b/internal/install/command.go @@ -50,7 +50,6 @@ var Command = &cobra.Command{ detailErr := validateProfile(config.DefaultMaxTimeoutSeconds, sg) if detailErr != nil { - sg.Track(detailErr.EventName) log.Fatal(detailErr) } @@ -165,8 +164,9 @@ func validateProfile(maxTimeoutSeconds int, sg *segment.Segment) *types.DetailEr licenseKey, err := client.FetchLicenseKey(accountID, config.FlagProfileName, &maxTimeoutSeconds) if err != nil { errorOccured = true - details := fmt.Sprintf("could not fetch license key for account %d:, license key: %v %s", accountID, utils.Obfuscate(licenseKey), err) - detailErr = types.NewDetailError(types.EventTypes.UnableToFetchLicenseKey, details) + message := fmt.Sprintf("could not fetch license key for account %d:, license key: %v %s", accountID, utils.Obfuscate(licenseKey), err) + log.Debug(message) + detailErr = types.NewDetailError(types.EventTypes.UnableToFetchLicenseKey, fmt.Sprintf("%s", err)) return detailErr } diff --git a/internal/synthetics/command_batch_run.go b/internal/synthetics/command_batch_run.go index 5e38775c4..9a8193420 100644 --- a/internal/synthetics/command_batch_run.go +++ b/internal/synthetics/command_batch_run.go @@ -5,15 +5,16 @@ import ( "os" "time" + log "github.com/sirupsen/logrus" + "github.com/spf13/cobra" + "gopkg.in/yaml.v3" + "github.com/newrelic/newrelic-cli/internal/client" configAPI "github.com/newrelic/newrelic-cli/internal/config/api" "github.com/newrelic/newrelic-cli/internal/install/ux" "github.com/newrelic/newrelic-cli/internal/output" "github.com/newrelic/newrelic-cli/internal/utils" "github.com/newrelic/newrelic-client-go/v2/pkg/synthetics" - log "github.com/sirupsen/logrus" - "github.com/spf13/cobra" - "gopkg.in/yaml.v3" ) var ( diff --git a/internal/synthetics/command_monitor_test.go b/internal/synthetics/command_monitor_test.go index 4bf9b2c33..12fadb742 100644 --- a/internal/synthetics/command_monitor_test.go +++ b/internal/synthetics/command_monitor_test.go @@ -6,8 +6,9 @@ package synthetics import ( "testing" - "github.com/newrelic/newrelic-cli/internal/testcobra" "github.com/stretchr/testify/assert" + + "github.com/newrelic/newrelic-cli/internal/testcobra" ) func TestSyntheticsMonitor(t *testing.T) {