mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 12:36:27 +00:00
42 lines
1013 B
JavaScript
42 lines
1013 B
JavaScript
const client = require("prom-client");
|
|
|
|
const topuponline_metrics = new client.Histogram({
|
|
name: "topuponline",
|
|
help: "this is the metric for getting request data based on code status",
|
|
labelNames: ["route", "status_code", "issuer_name", "date", "month", "year"],
|
|
});
|
|
|
|
const topuponline_metrics_response_time = new client.Histogram({
|
|
name: "topuponline_response_time",
|
|
help: "this is the metric for getting request data based on response time",
|
|
labelNames: [
|
|
"route",
|
|
"status_code",
|
|
"issuer_name",
|
|
"date",
|
|
"month",
|
|
"year",
|
|
"response_time",
|
|
],
|
|
});
|
|
|
|
const topuponline_metrics_load_balance = new client.Histogram({
|
|
name: "topuponline_load_balance",
|
|
help: "this is the metric for getting request data based on response time",
|
|
labelNames: [
|
|
"route",
|
|
"status_code",
|
|
"issuer_name",
|
|
"date",
|
|
"month",
|
|
"year",
|
|
"trxId",
|
|
],
|
|
});
|
|
|
|
module.exports = {
|
|
topuponline_metrics,
|
|
topuponline_metrics_response_time,
|
|
topuponline_metrics_load_balance,
|
|
};
|