mirror of
https://github.com/openfaas/faas.git
synced 2025-06-24 15:53:26 +00:00
Add RED metrics
- this PR adds metrics via Prometheus for instrumentation and to move towards using HPAv2 / custom metrics in Kubernetes. Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit is contained in:
@ -91,6 +91,8 @@ func (ReadConfig) Read(hasEnv HasEnv) WatchdogConfig {
|
||||
cfg.combineOutput = parseBoolValue(hasEnv.Getenv("combine_output"))
|
||||
}
|
||||
|
||||
cfg.metricsPort = 8081
|
||||
|
||||
return cfg
|
||||
}
|
||||
|
||||
@ -132,4 +134,7 @@ type WatchdogConfig struct {
|
||||
|
||||
// combineOutput combines stderr and stdout in response
|
||||
combineOutput bool
|
||||
|
||||
// metricsPort is the HTTP port to serve metrics on
|
||||
metricsPort int
|
||||
}
|
||||
|
Reference in New Issue
Block a user