But we want to push the approach even further.
So we decided to implement a native way in Kuzzle to monitor the backend and make it accessible for the most standard tools of today, but also to open the field for future implementations.
The first technologies to be made available will be:
Feature Description
Kuzzle is a backend. Each backend is intended to be deployed in scalable environments. These environments create a need for monitoring and metrology.
It is possible today to use Kuzzle with one of the technologies already implemented in the monitoring world:
https://github.com/kuzzleio/kuzzle-plugin-prometheus
But we want to push the approach even further.
So we decided to implement a native way in Kuzzle to monitor the backend and make it accessible for the most standard tools of today, but also to open the field for future implementations.
The first technologies to be made available will be:
https://prometheus.io/ and https://opentelemetry.io/
Example Use Case
When installing Kuzzle on a docker-compose or docker swarm, or even Kubernetes we need monitoring.
For some of our infrastructures, we need a native way (without plugin installation) to be able to perform these actions.
The tools we use are not always the classic prometheus \/ Grafana and for that we need a system that is extensible to use other tools and formats
Possible Solution (optional)
Create a new service
A new onAsk \/ ask
Have a metrics controller that relies on the metrics service
Have a route to get the metrics
In the metrics controller there will be an onAsk that will aggregate information from the core
Add a categorisation level
Internal level
Plugin level
Have a separation in the metrics
Allow users to add new metrics via the framework
Have a map (or something in RAM) to allow to collect information when calling the metrics\/get route of the controller
Persist some snapshots with an ID in RAM (the last n) - If there is ever a hole in a graph, we need to be able to browse these snapshots.
Add a function that would format the metrics according to formats supported by Kuzzle.
Prometheus
OpenTelemetry
JSON
Point of attention in the code
index.js level controller
In the funnel, import the controller
set the controller in the funnel
httpsRoutes -> add the new routes after the others
Spec OpenAPI → openapi\/component\/
Do the tests with Jest in api\/controller\/