Files
Online-Topup-V1/application/helpers/prometheusmetrics.js
T
2023-04-17 00:19:40 +07:00

24 lines
667 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",
],
});
module.exports = { topuponline_metrics, topuponline_metrics_response_time };