"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.metricsRouter = void 0;
const tslib_1 = require("tslib");
const express_1 = tslib_1.__importDefault(require("express"));
const metrics_1 = require("../../lib/opentelemetry/metrics");
const middlewares_1 = require("../../middlewares");
const metricsRouter = express_1.default.Router();
exports.metricsRouter = metricsRouter;
metricsRouter.post('/playback', (0, middlewares_1.asyncMiddleware)(middlewares_1.addPlaybackMetricValidator), addPlaybackMetric);
function addPlaybackMetric(req, res) {
    const body = req.body;
    metrics_1.OpenTelemetryMetrics.Instance.observePlaybackMetric(res.locals.onlyImmutableVideo, body);
    return res.sendStatus(204);
}
//# sourceMappingURL=metrics.js.map