🐛 fix(userMemories): should log out more errors for extraction (#11810)

This commit is contained in:
Neko
2026-01-25 17:28:12 +08:00
committed by GitHub
parent 9bd4ad3425
commit e45c5290f6

View File

@@ -579,6 +579,7 @@ export class MemoryExtractionExecutor {
message: error instanceof Error ? error.message : 'Failed to generate embeddings',
});
span.recordException(error as Error);
console.error('[memory-extraction] failed to generate embeddings', error, 'model:', model);
return texts.map(() => null);
} finally {
@@ -1376,6 +1377,14 @@ export class MemoryExtractionExecutor {
message: error instanceof Error ? error.message : 'Extraction failed',
});
span.recordException(error as Error);
console.error(
'[memory-extraction] topic extraction failed',
error,
'topicId:',
job.topicId,
'userId:',
job.userId,
);
if (tracePayload) {
tracePayload.error = serializeError(error);
@@ -1692,6 +1701,18 @@ export class MemoryExtractionExecutor {
error instanceof Error ? error.message : 'Failed to persist extracted memories',
});
span.recordException(error as Error);
console.error(
'[memory-extraction] failed to persist memories',
error,
'layer:',
layer,
'source:',
job.source,
'sourceId:',
job.sourceId,
'userId:',
job.userId,
);
} finally {
span.end();
}
@@ -2105,6 +2126,14 @@ export class MemoryExtractionExecutor {
message: error instanceof Error ? error.message : 'Extraction failed',
});
span.recordException(error as Error);
console.error(
'[memory-extraction] benchmark extraction failed',
error,
'sourceId:',
params.sourceId,
'userId:',
params.userId,
);
throw error;
} finally {
span.end();