aboutsummaryrefslogtreecommitdiff
path: root/weed/operation/upload_content.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2022-08-04 13:44:54 +0500
committerGitHub <noreply@github.com>2022-08-04 01:44:54 -0700
commit22181dd01895d5c993979678ae13c601548c20f8 (patch)
treeb3477a5e8a9edb050d0f24dcd9cb3b195385798e /weed/operation/upload_content.go
parentbd13a7968f9cc7620f19511e896c6e0099ff7f86 (diff)
downloadseaweedfs-22181dd01895d5c993979678ae13c601548c20f8.tar.xz
seaweedfs-22181dd01895d5c993979678ae13c601548c20f8.zip
refactor FilerRequest metrics (#3402)
* refactor FilerRequest metrics * avoid double count proxy * defer to
Diffstat (limited to 'weed/operation/upload_content.go')
-rw-r--r--weed/operation/upload_content.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.go
index bd61b047f..cafba5ce9 100644
--- a/weed/operation/upload_content.go
+++ b/weed/operation/upload_content.go
@@ -7,6 +7,7 @@ import (
"github.com/seaweedfs/seaweedfs/weed/glog"
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
"github.com/seaweedfs/seaweedfs/weed/security"
+ "github.com/seaweedfs/seaweedfs/weed/stats"
"github.com/seaweedfs/seaweedfs/weed/util"
"io"
"mime"
@@ -267,6 +268,7 @@ func upload_content(fillBufferFunction func(w io.Writer) error, originalDataSize
if strings.Contains(post_err.Error(), "connection reset by peer") ||
strings.Contains(post_err.Error(), "use of closed network connection") {
glog.V(1).Infof("repeat error upload request %s: %v", option.UploadUrl, postErr)
+ stats.FilerRequestCounter.WithLabelValues(stats.RepeatErrorUploadContent).Inc()
resp, post_err = HttpClient.Do(req)
}
}