feat: use cameleer.processorId MDC key for precise log-to-processor correlation
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user