mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
- Implemented MonitorUtil for managing monitor secrets and populating them in monitor steps and tests. - Created StackTraceParser to parse and structure stack traces from various programming languages. - Developed SyslogParser to handle and parse syslog messages in both RFC 5424 and RFC 3164 formats.
39 lines
955 B
TypeScript
39 lines
955 B
TypeScript
import TelemetryIngest, {
|
|
TelemetryRequest,
|
|
} from "Common/Server/Middleware/TelemetryIngest";
|
|
import ProductType from "Common/Types/MeteredPlan/ProductType";
|
|
import Express, {
|
|
ExpressRequest,
|
|
ExpressResponse,
|
|
ExpressRouter,
|
|
NextFunction,
|
|
RequestHandler,
|
|
} from "Common/Server/Utils/Express";
|
|
import FluentLogsIngestService from "../Services/FluentLogsIngestService";
|
|
|
|
const router: ExpressRouter = Express.getRouter();
|
|
|
|
const setFluentProductType: RequestHandler = (
|
|
req: ExpressRequest,
|
|
_res: ExpressResponse,
|
|
next: NextFunction,
|
|
): void => {
|
|
(req as TelemetryRequest).productType = ProductType.Logs;
|
|
next();
|
|
};
|
|
|
|
router.post(
|
|
"/fluentd/v1/logs",
|
|
setFluentProductType,
|
|
TelemetryIngest.isAuthorizedServiceMiddleware,
|
|
async (
|
|
req: ExpressRequest,
|
|
res: ExpressResponse,
|
|
next: NextFunction,
|
|
): Promise<void> => {
|
|
return FluentLogsIngestService.ingestFluentLogs(req, res, next);
|
|
},
|
|
);
|
|
|
|
export default router;
|