Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8fc9bfcf
Commit
8fc9bfcf
authored
Oct 22, 2020
by
Matthias Käppler
Committed by
Alessio Caiazza
Oct 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't log "success" when failing over to original image
parent
9b8d7b7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
changelogs/unreleased/311-dont-log-success-for-failovers.yml
changelogs/unreleased/311-dont-log-success-for-failovers.yml
+5
-0
internal/imageresizer/image_resizer.go
internal/imageresizer/image_resizer.go
+7
-3
No files found.
changelogs/unreleased/311-dont-log-success-for-failovers.yml
0 → 100644
View file @
8fc9bfcf
---
title
:
Don't log image scaler fail-overs as successes
merge_request
:
636
author
:
type
:
fixed
internal/imageresizer/image_resizer.go
View file @
8fc9bfcf
...
...
@@ -174,11 +174,15 @@ func (r *Resizer) Inject(w http.ResponseWriter, req *http.Request, paramsData st
return
}
if
resizeCmd
!=
nil
{
widthLabelVal
:=
strconv
.
Itoa
(
int
(
params
.
Width
))
imageResizeDurations
.
WithLabelValues
(
params
.
ContentType
,
widthLabelVal
)
.
Observe
(
time
.
Since
(
start
)
.
Seconds
())
if
resizeCmd
==
nil
{
// This means we served the original image because rescaling failed
logger
.
WithFields
(
*
logFields
(
bytesWritten
))
.
Printf
(
"ImageResizer: Served original"
)
return
}
widthLabelVal
:=
strconv
.
Itoa
(
int
(
params
.
Width
))
imageResizeDurations
.
WithLabelValues
(
params
.
ContentType
,
widthLabelVal
)
.
Observe
(
time
.
Since
(
start
)
.
Seconds
())
logger
.
WithFields
(
*
logFields
(
bytesWritten
))
.
Printf
(
"ImageResizer: Success"
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment