backtrace-service
Advanced tools
Comparing version 3.0.6 to 3.0.7
@@ -36,4 +36,11 @@ import express from 'express'; | ||
addMetric(name: string, value: number): void; | ||
/** | ||
* Add single value to a histogram type metric | ||
* This is the same as addMetric except for _type: 'h' | ||
* @param name metrics name | ||
* @param value metrics value | ||
*/ | ||
addMetricHistogram(name: string, value: number): void; | ||
private registerRequestLatency; | ||
private send; | ||
} |
@@ -124,2 +124,17 @@ "use strict"; | ||
}; | ||
/** | ||
* Add single value to a histogram type metric | ||
* This is the same as addMetric except for _type: 'h' | ||
* @param name metrics name | ||
* @param value metrics value | ||
*/ | ||
MetricsStorage.prototype.addMetricHistogram = function (name, value) { | ||
// metrics are disabled because of missing secret and uuid parameters | ||
if (!this.uuid || !this.secret) { | ||
return; | ||
} | ||
name = name + "|ST[hostname:" + this._hostName + "]"; | ||
this._data[name] = this._data[name] || { _type: 'h', _value: [] }; | ||
this._data[name]._value.push(value); | ||
}; | ||
MetricsStorage.prototype.registerRequestLatency = function (req, res, next) { | ||
@@ -126,0 +141,0 @@ var _this = this; |
{ | ||
"name": "backtrace-service", | ||
"version": "3.0.6", | ||
"version": "3.0.7", | ||
"description": "Common tools for Backtrace Node services", | ||
@@ -5,0 +5,0 @@ "author": "Backtrace", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
155502
2159