gatewayd-io / proposals

GatewayD proposals for the core, plugins and other projects
GNU Affero General Public License v3.0
0 stars 0 forks source link

Metrics #1

Open olivierACRI opened 10 months ago

olivierACRI commented 10 months ago

Hi, That would be interesting to have metrics (in Prometheus form) about the requests made (insert, select, update, delete...) with some KPIs on the size for instance (x rows returned). And this will be perfect if we can segregate per client application (application connecting to the Gateway) and server (Database).

mostafa commented 10 months ago

Hey @olivierACRI,

That's a really good idea for a plugin. Also, the other parameters you introduced, like application_name, database and others, can be metrics' labels. And the good part is that you don't need to worry about exposing metrics from the plugin, as it is taken care of by GatewayD using the metrics merger.

Creating a new plugin is fairly straightforward using the SDK and the plugin template for Go. There are also guides in the docs about developing plugins.

I'll move the ticket to the proposals repository, so I can track them there in one place.

olivierACRI commented 10 months ago

Great info about the plugin, looks like this is something I can achieve.