diff --git a/internal/signalfx-agent/pkg/utils/http.go b/internal/signalfx-agent/pkg/utils/http.go deleted file mode 100644 index 62cefb8f66..0000000000 --- a/internal/signalfx-agent/pkg/utils/http.go +++ /dev/null @@ -1,13 +0,0 @@ -package utils - -import ( - "errors" - "regexp" -) - -var accessTokenSanitizer = regexp.MustCompile(`(?i)x-sf-token:\[[^\s]+\]`) - -// SanitizeHTTPError will remove any sensitive data from HTTP client errors. -func SanitizeHTTPError(err error) error { - return errors.New(accessTokenSanitizer.ReplaceAllString(err.Error(), "")) -}