Skip to content

Commit 6a72354

Browse files
authored
[telemetry] Don't log user errors (#2305)
## Summary We're running out of Sentry events and it looks like the culprit is devbox overlogging, including a lot of user errors that should not be logged. This PR #844 removed code that avoided logging user errors. I think this was a bug? If programmer wants a user error to be logged, they should use `WithLoggedUserMessage` instead. ## How was it tested? Untested
1 parent 57312c0 commit 6a72354

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/boxcli/midcobra/telemetry.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func (m *telemetryMiddleware) postRun(cmd *cobra.Command, args []string, runErr
4343
defer telemetry.Stop()
4444

4545
var userExecErr *usererr.ExitError
46-
if errors.As(runErr, &userExecErr) {
46+
if errors.As(runErr, &userExecErr) || !usererr.ShouldLogError(runErr) {
4747
return
4848
}
4949

0 commit comments

Comments
 (0)