Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
139f0774
Commit
139f0774
authored
Oct 23, 2017
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prometheus: enable gzip for /metrics endpoint
closes #9464
parent
1fd2270a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
pkg/api/http_server.go
+2
-3
pkg/middleware/util.go
+4
-0
No files found.
pkg/api/http_server.go
View file @
139f0774
...
@@ -188,9 +188,8 @@ func (hs *HttpServer) metricsEndpoint(ctx *macaron.Context) {
...
@@ -188,9 +188,8 @@ func (hs *HttpServer) metricsEndpoint(ctx *macaron.Context) {
return
return
}
}
promhttp
.
HandlerFor
(
prometheus
.
DefaultGatherer
,
promhttp
.
HandlerOpts
{
promhttp
.
HandlerFor
(
prometheus
.
DefaultGatherer
,
promhttp
.
HandlerOpts
{})
.
DisableCompression
:
true
,
ServeHTTP
(
ctx
.
Resp
,
ctx
.
Req
.
Request
)
})
.
ServeHTTP
(
ctx
.
Resp
,
ctx
.
Req
.
Request
)
}
}
func
(
hs
*
HttpServer
)
healthHandler
(
ctx
*
macaron
.
Context
)
{
func
(
hs
*
HttpServer
)
healthHandler
(
ctx
*
macaron
.
Context
)
{
...
...
pkg/middleware/util.go
View file @
139f0774
...
@@ -21,6 +21,10 @@ func Gziper() macaron.Handler {
...
@@ -21,6 +21,10 @@ func Gziper() macaron.Handler {
return
return
}
}
if
strings
.
HasPrefix
(
requestPath
,
"/metrics"
)
{
return
}
ctx
.
Invoke
(
macaronGziper
)
ctx
.
Invoke
(
macaronGziper
)
}
}
}
}
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