Roman Shishkin
2 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
7 additions and
1 deletions
-
weed/s3api/s3api_object_handlers_put.go
-
weed/s3api/stats.go
|
|
@ -362,7 +362,7 @@ func (s3a *S3ApiServer) putToFiler(r *http.Request, uploadUrl string, dataReader |
|
|
|
return "", filerErrorToS3Error(ret.Error), "" |
|
|
|
} |
|
|
|
|
|
|
|
stats_collect.RecordBucketActiveTime(bucket) |
|
|
|
BucketTrafficReceived(ret.Size, r) |
|
|
|
|
|
|
|
// Return the SSE type determined by the unified handler
|
|
|
|
return etag, s3err.ErrNone, sseResult.SSEType |
|
|
|
|
|
@ -37,6 +37,12 @@ func TimeToFirstByte(action string, start time.Time, r *http.Request) { |
|
|
|
stats_collect.RecordBucketActiveTime(bucket) |
|
|
|
} |
|
|
|
|
|
|
|
func BucketTrafficReceived(bytesReceived int64, r *http.Request) { |
|
|
|
bucket, _ := s3_constants.GetBucketAndObject(r) |
|
|
|
stats_collect.RecordBucketActiveTime(bucket) |
|
|
|
stats_collect.S3BucketTrafficReceivedBytesCounter.WithLabelValues(bucket).Add(float64(bytesReceived)) |
|
|
|
} |
|
|
|
|
|
|
|
func BucketTrafficSent(bytesTransferred int64, r *http.Request) { |
|
|
|
bucket, _ := s3_constants.GetBucketAndObject(r) |
|
|
|
stats_collect.RecordBucketActiveTime(bucket) |
|
|
|