11 Commits

Author SHA1 Message Date
Alex Ellis (OpenFaaS Ltd)
1d10e89aa2 Add HTTP status code to histogram
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>
2022-06-01 09:33:36 +01:00
Alex Ellis (OpenFaaS Ltd)
cdb6baddda Deference channel
The defer close statement was causing issues in CI

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2022-01-24 16:41:30 +00:00
Alex Ellis (OpenFaaS Ltd)
d85d5e7239 Export new metrics for OpenFaaS Pro scaling
* 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>
2022-01-24 14:30:08 +00:00
Vivek Singh
c0ba41ce33 Use default namespace in metrics exporter
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2020-11-02 10:35:57 +00:00
Alex Ellis (OpenFaaS Ltd)
f652692966 Fix test on help description message
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-03-12 14:02:57 +00:00
Alex Ellis (OpenFaaS Ltd)
df97efafae Migrate away from requests package for Function structs
The function deployment and status structs have been moved away
into the faas-provider package.

Tested with a build, running tests, and CI.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2019-08-05 12:58:30 +01:00
Radoslav Dimitrov
c5122279c9 Fix unit test fail due to race condition #1063
Signed-off-by: Radoslav Dimitrov <dimitrovr@vmware.com>
2019-01-30 10:28:13 +00:00
Alex Ellis (VMware)
fca32a0e79 Instrument async handlers
- 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>
2019-01-24 09:12:46 +00:00
Alex Ellis (VMware)
3598da2e51 Enable basic auth for service query / scaling on provider
- this is a blocking issue for auth with Docker Swarm
fixes #879

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-19 20:52:14 +01:00
Ken Fukuyama
9ceac9c67e Renamed ServiceReplicasCounter to ServiceReplicasGauge
To avoid future confusion, this fix renames ServiceReplicasCounter to
ServiceReplicasGauge.

Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
2018-08-24 09:01:41 +01:00
Ken Fukuyama
4fabd50799 Changed Metrics to be exposed via Exporter
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>
2018-08-24 09:01:41 +01:00