feat: use cameleer.processorId MDC key for precise log-to-processor correlation
All checks were successful
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m52s
CI / docker (push) Successful in 1m54s
CI / deploy (push) Successful in 56s
CI / deploy-feature (push) Has been skipped

LogTab now checks mdc['cameleer.processorId'] first when filtering logs
for a selected processor node, falling back to fuzzy message/loggerName
matching for older agents without the new MDC key.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-16 00:19:02 +02:00
parent 859cf7c10d
commit a4a5986f38
2 changed files with 5 additions and 6 deletions

View File

@@ -15,13 +15,11 @@ interface LogTabProps {
}
function matchesProcessor(e: LogEntryResponse, pid: string): boolean {
// Prefer the explicit MDC key set by the agent
if (e.mdc?.['cameleer.processorId'] === pid) return true;
// Fallback: fuzzy match in message/logger for older agents
if (e.message?.includes(pid)) return true;
if (e.loggerName?.includes(pid)) return true;
if (e.mdc) {
for (const v of Object.values(e.mdc)) {
if (v === pid) return true;
}
}
return false;
}