mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-18 22:14:23 +01:00
11 lines
272 B
TypeScript
11 lines
272 B
TypeScript
import { MiddlewareHandler } from '@hono/hono';
|
|
|
|
import { httpRequestCounter } from '@/metrics.ts';
|
|
|
|
export const metricsMiddleware: MiddlewareHandler = async (c, next) => {
|
|
const { method, path } = c.req;
|
|
httpRequestCounter.inc({ method, path });
|
|
|
|
await next();
|
|
};
|