The histogram for gateway_functions_seconds excluded the status
code that gives important information for setting up SLOs.
Fixes: #1725
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
* Add service target metric
* Add service min replicas metric
* Add scale type metric
These combined allow new auto-scaling modes and parameters
for OpenFaaS Pro customers.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This should be a "no-harm" change to use the namespace/sub-
system definition for CounterOpts.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
* This experimental patch records metrics as invocations start
so that the metrics can be used to make better scale to zero
decisions in faas-idler.
Tested with Kubernetes on a single-node cluster, metrics
reported as expected. Existing metrics still report.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
- instruments async handler for report and for queueing async
requests
- make MustRegister only ever run once to prevent sync issues
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
- updates the Prometheus go client version and switches to the
promhttp handler to avoid conflicts with the new system-level
metrics.
Tested with Docker Swarm locally - no conflicts and new metrics
were gathered.
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
Partially fixes#532 by introducing two metrics that are
supported by Kubernetes HPAv2 and RED metrics-style
dashboards.
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
This change exposes the gateway metrics with an exporter which
implements the Collector interface of prometheus.
This change Fixes#697
Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>