mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
chore: centralize project.id span; drop superfluous worker spans
The project resource setter is the canonical owner of project.id (cloud already adds it there for every worker span). Add it to the OSS worker project resource too, and drop the redundant project.id from the database worker. Also drop queue.pid/queue.name/message.timestamp: queue.name duplicates the span action (worker.databases) and none were part of the logging this PR replaced. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5218fc8209
commit
486d9271ac
2 files changed
+6
-6
No files matched your search
@@ -18,6 +18,7 @@ use Utopia\Logger\Log;
|
||||
use Utopia\Pools\Group;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Registry\Registry;
|
||||
use Utopia\Span\Span;
|
||||
use Utopia\Storage\Device\Telemetry as TelemetryDevice;
|
||||
use Utopia\System\System;
|
||||
use Utopia\Telemetry\Adapter as Telemetry;
|
||||
@@ -55,7 +56,11 @@ return function (Container $container): void {
|
||||
return $project;
|
||||
}
|
||||
|
||||
return $dbForPlatform->getDocument('projects', $project->getId());
|
||||
$project = $dbForPlatform->getDocument('projects', $project->getId());
|
||||
|
||||
Span::add('project.id', $project->getId());
|
||||
|
||||
return $project;
|
||||
}, ['message', 'dbForPlatform']);
|
||||
|
||||
$container->set('dbForProject', fn (DatabaseFactory $databaseFactory, Document $project, Database $dbForPlatform) => $project->isEmpty() || $project->getId() === 'console'
|
||||
|
||||
@@ -61,11 +61,6 @@ class Databases extends Action
|
||||
throw new Exception('Missing payload');
|
||||
}
|
||||
|
||||
Span::add('project.id', $project->getId());
|
||||
Span::add('queue.pid', $message->getPid());
|
||||
Span::add('queue.name', $message->getQueue());
|
||||
Span::add('message.timestamp', (string) $message->getTimestamp());
|
||||
|
||||
$databaseMessage = DatabaseMessage::fromArray($payload);
|
||||
|
||||
$type = $databaseMessage->type;
|
||||
|
||||
Reference in new issue
Block a user