feat(logging): exclude Dashboard requests from access logs processing

- Updated the log processing functions to filter out requests that start with "/dashboard".
- Enhanced the monitoring configuration to also exclude Dashboard requests alongside the Dokploy service app.
This commit is contained in:
Mauricio Siu
2025-12-09 17:06:11 -06:00
parent 4a74016b52
commit 2fc29ff7c8
2 changed files with 13 additions and 1 deletions

View File

@@ -27,6 +27,10 @@ export function processLogs(
if (log.ServiceName === "dokploy-service-app@file") {
return null;
}
// Exclude Dashboard requests - they start with /dashboard
if (log.RequestPath?.startsWith("/dashboard")) {
return null;
}
const date = new Date(log.StartUTC);
if (dateRange?.start || dateRange?.end) {
@@ -97,6 +101,10 @@ export function parseRawConfig(
}
})
.compact()
.filter((log) => {
// Exclude Dashboard requests - they start with /dashboard
return !log.RequestPath?.startsWith("/dashboard");
})
.value();
// Apply date range filter if provided

View File

@@ -162,7 +162,11 @@ export const readMonitoringConfig = async (readAll = false) => {
trimmed.endsWith("}")
) {
const log = JSON.parse(trimmed);
if (log.ServiceName !== "dokploy-service-app@file") {
// Exclude Dokploy service app and Dashboard requests
if (
log.ServiceName !== "dokploy-service-app@file" &&
!log.RequestPath?.startsWith("/dashboard")
) {
content += `${line}\n`;
validCount++;
if (validCount >= 500) {