Files
RSSHub/lib/routes/metrics.ts
T
Nya Candyandincubator4 68c7430fbb feat(core): opentelementry support (update of #14668) (#16087)
* chore: squash commit

* fix: tweak some mentioned issues

---------

Co-authored-by: incubator4 <aries0robin@gmail.com>
2024-07-05 19:22:33 +08:00

13 lines
297 B
TypeScript

import type { Handler } from 'hono';
import { getContext } from '@/utils/otel';
const handler: Handler = (ctx) =>
getContext()
.then((val) => ctx.text(val))
.catch((error) => {
ctx.status(500);
ctx.json({ error });
});
export default handler;