OpenFaaS CE exposes metrics about function invocations and
about the gateway itself. OpenFaaS Pro has a richer set of
metrics including HTTP RED.
See also: https://docs.openfaas.com/architecture/metrics/
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
* Removes service min and target metrics from the CE gateway
OpenFaaS Pro metrics are no longer required in OpenFaaS CE
since there is an OpenFaaS Pro gateway available.
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 patch changes the code which looks up service and appends
them to the Exporter's list. It previously would create an
endless list and cause a memory leak.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
* Updates AngularJS to 1.8.0
* Updates the MaterialUI theme to 1.2.1
* Fixes: #1576
Tested by running the gateway locally, with NATS, Prometheus,
and a gateway port-forwarded from a local KinD cluster.
The UI rendered and the newer files were served. Functions
could be deployed and invoked from the store and CLI.
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>
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>
- 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>
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>
- updates comments and adds where missing
- updates locks so that unlock is done via defer instead of
at the end of the statement
- extracts timeout variable in two places
- remove makeClient() unused method from metrics package
No-harm changes tested via go build.
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>