/**
 * Metrics endpoint for Prometheus
 */

import { Router } from 'express';
import { solacenetMetrics } from '@/infrastructure/monitoring/solacenet-metrics';

const router = Router();

/**
 * @swagger
 * /metrics:
 *   get:
 *     summary: Prometheus metrics endpoint
 *     description: Exposes metrics in Prometheus format
 *     tags: [Monitoring]
 *     responses:
 *       200:
 *         description: Metrics in Prometheus format
 *         content:
 *           text/plain:
 *             schema:
 *               type: string
 */
router.get('/metrics', (req, res) => {
  res.set('Content-Type', 'text/plain');
  res.send(solacenetMetrics.getMetrics());
});

export default router;
