Browse Source

refactor: disable metrics middleware

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4930/head
Pranav C 2 years ago
parent
commit
38bd788060
  1. 9
      packages/nocodb/src/lib/meta/helpers/apiMetrics.ts

9
packages/nocodb/src/lib/meta/helpers/apiMetrics.ts

@ -3,6 +3,7 @@ import { Tele } from 'nc-help';
const countMap = {};
// @ts-ignore
const metrics = async (req: Request, c = 150) => {
if (!req?.route?.path) return;
const event = `a:api:${req.route.path}:${req.method}`;
@ -13,12 +14,12 @@ const metrics = async (req: Request, c = 150) => {
}
};
const metaApiMetrics = (req: Request, _res, next) => {
metrics(req, 50).then(() => {});
const metaApiMetrics = (_req: Request, _res, next) => {
// metrics(req, 50).then(() => {});
next();
};
export default (req: Request, _res, next) => {
metrics(req).then(() => {});
export default (_req: Request, _res, next) => {
// metrics(req).then(() => {});
next();
};

Loading…
Cancel
Save