50 lines
1.2 KiB
JavaScript
50 lines
1.2 KiB
JavaScript
// Module ID: 929
|
|
// Function ID: 10113
|
|
// Name: captureMetric
|
|
// Dependencies: [861]
|
|
|
|
// Module 929 (captureMetric)
|
|
const require = arg1;
|
|
const dependencyMap = arg6;
|
|
function captureMetric(distribution, name, value, unit) {
|
|
let obj = require(861) /* setMetricAttribute */;
|
|
obj = { type: distribution, name, value };
|
|
unit = undefined;
|
|
if (null != unit) {
|
|
unit = unit.unit;
|
|
}
|
|
obj.unit = unit;
|
|
let attributes;
|
|
if (null != unit) {
|
|
attributes = unit.attributes;
|
|
}
|
|
obj.attributes = attributes;
|
|
obj = {};
|
|
let scope;
|
|
if (null != unit) {
|
|
scope = unit.scope;
|
|
}
|
|
obj.scope = scope;
|
|
const result = obj._INTERNAL_captureMetric(obj, obj);
|
|
}
|
|
Object.defineProperty(arg5, Symbol.toStringTag, { value: "Module" });
|
|
arg5.count = function count(arg0) {
|
|
let num = 1;
|
|
if (arguments.length > 1) {
|
|
num = 1;
|
|
if (undefined !== arguments[1]) {
|
|
num = arguments[1];
|
|
}
|
|
}
|
|
let tmp2;
|
|
if (arguments.length > 2) {
|
|
tmp2 = arguments[2];
|
|
}
|
|
captureMetric("counter", arg0, num, tmp2);
|
|
};
|
|
arg5.distribution = function distribution(name, value, unit) {
|
|
captureMetric("distribution", name, value, unit);
|
|
};
|
|
arg5.gauge = function gauge(name, value, unit) {
|
|
captureMetric("gauge", name, value, unit);
|
|
};
|