mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Support of HTTP Node metrics
This commit is contained in:
@@ -201,7 +201,13 @@ Node.prototype.error = function(msg) {
|
||||
log_helper(this, Log.ERROR, msg);
|
||||
};
|
||||
|
||||
/**
|
||||
* If called with no args, returns whether metric collection is enabled
|
||||
*/
|
||||
Node.prototype.metric = function(eventname, msg, metricValue) {
|
||||
if (typeof eventname === "undefined") {
|
||||
return Log.metric();
|
||||
}
|
||||
var metrics = {};
|
||||
metrics.level = Log.METRIC;
|
||||
metrics.nodeid = this.id;
|
||||
|
Reference in New Issue
Block a user