18 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)
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
Alex Ellis (OpenFaaS Ltd)
37bf15e508 Namespace invocation_total
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>
2020-03-12 13:51:43 +00:00
Alex Ellis (OpenFaaS Ltd)
c4f924cfb5 Update Started variable to GatewayFunctionInvocationStarted
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-03-12 13:51:43 +00:00
Alex Ellis (OpenFaaS Ltd)
96812d2cd8 Record metrics for invocations when they start
* 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>
2020-03-12 13:51:43 +00:00
Alex Ellis (VMware)
f7cf7a6496 Split out notifiers
- splits out notifiers and writes status for async handler

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2019-01-24 09:12:46 +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)
e9cf708cb5 Bump Prometheus client version
- 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>
2019-01-24 09:12:46 +00:00
Alex Ellis (VMware)
1cc767e898 Add service RED metrics definitions
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>
2019-01-24 09:12:46 +00: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
Alex
569ccbf323 Add license into code files for MIT 2017-04-27 23:21:50 +01:00
Alex Ellis
a63dd8ee4c Simplify instrumentation metrics.
- fix javascript deserialization in UI with json response
-  create swarm watcher to monitor replicas
2017-03-14 22:10:24 +00:00
Alex
38713184e5 Add status code instrumentation for functions 2017-03-14 22:10:24 +00:00
Alex Ellis
b9bd7c8101 Extract separate files/packages for better visibility. 2017-01-21 15:50:19 +00:00
Alex
ab2f8e85f3 Introduce gateway_function_invocation_total to track individual functions
Introduce prometheus_alertmanager into stack - have it fire into webhook stash
2017-01-21 10:11:33 +00:00
Alex
2b9a1c10e4 add metrics and sample node.js function 2016-12-22 23:09:44 +00:00
Alex
6073cd79f6 Add metrics 2016-12-22 21:27:07 +00:00