diffusion
Version:
Diffusion JavaScript client
48 lines (47 loc) • 2.34 kB
JavaScript
;
/**
* @module Services.MetricCollectors
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.SessionMetricCollectorImpl = void 0;
var abstract_metric_collector_1 = require("./abstract-metric-collector");
/**
* A session metric collector.
*/
var SessionMetricCollectorImpl = /** @class */ (function (_super) {
__extends(SessionMetricCollectorImpl, _super);
/**
* Create a new SessionMetricCollector instance
*
* @param name identity
* @param exportToPrometheus whether to expose the collector through the Prometheus gateway
* @param removeMetricsWithNoMatches whether to remove metrics when there are no longer matching sessions
* @param sessionFilter identifies the target sessions
* @param groupByProperties session property keys that define the groupBy dimensions for this collector;
* may be empty
*/
function SessionMetricCollectorImpl(name, exportToPrometheus, maximumGroups, removeMetricsWithNoMatches, sessionFilter, groupByProperties) {
var _this = _super.call(this, name, exportToPrometheus, maximumGroups) || this;
_this.sessionFilter = sessionFilter;
_this.groupByProperties = groupByProperties;
_this.removeMetricsWithNoMatches = removeMetricsWithNoMatches;
return _this;
}
return SessionMetricCollectorImpl;
}(abstract_metric_collector_1.AbstractMetricCollector));
exports.SessionMetricCollectorImpl = SessionMetricCollectorImpl;