kubeless icon indicating copy to clipboard operation
kubeless copied to clipboard

Feature Request : Enable customization of the metrics

Open philippe-lavoie opened this issue 3 years ago • 0 comments

Feature Request : allow functions to expose custom metrics

What happened: I wanted to return some custom metrics, however the path /metrics is intercepted by kubeless

What you expected to happen: It's good that there is a default implementation, however it would be nice if I could access the global register and add my custom labels or custom metrics.

For example the following does not inject new labels

const { collectDefaultMetrics, register } = require('prom-client');

// Enable the collection of default metrics
collectDefaultMetrics({
  labels: { NODE_APP_INSTANCE: process.env.NODE_APP_INSTANCE , app : 'get-order'},
});

philippe-lavoie avatar Jun 22 '21 15:06 philippe-lavoie