Merge pull request #12390 from appwrite/migration-worker-sentry-source-tags

Tag migrations-worker Sentry events with source projectId and endpoint
This commit is contained in:
Jake Barnby authored and GitHub committed 2026-05-27 19:11:02 +12:00
commit fe8080d8f4
1 file changed
+12 -2
+12 -2
View File
@@ -613,11 +613,21 @@ class Migrations extends Action
}
if ($publish) {
call_user_func($this->logError, $th, 'appwrite-worker', 'appwrite-queue-' . self::getName(), [
$extras = [
'migrationId' => $migration->getId(),
'source' => $migration->getAttribute('source') ?? '',
'destination' => $migration->getAttribute('destination') ?? '',
]);
];
// Include source identifiers for Appwrite sources to make Sentry events
// self-debuggable. Never include the apiKey or any other secret.
if ($migration->getAttribute('source') === SourceAppwrite::getName()) {
$credentials = $migration->getAttribute('credentials', []) ?? [];
$extras['sourceProjectId'] = $credentials['projectId'] ?? '';
$extras['sourceEndpoint'] = $credentials['endpoint'] ?? '';
}
call_user_func($this->logError, $th, 'appwrite-worker', 'appwrite-queue-' . self::getName(), $extras);
}
} finally {
try {