mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-16 04:35:24 +02:00
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:
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user