mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
chore: add group to usage event
This commit is contained in:
1 parent
3a8801ed82
commit
44226178db
2 files changed
+16
-1
No files matched your search
@@ -51,6 +51,22 @@ class Usage extends Event
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add group.
|
||||
*
|
||||
* @param string $key
|
||||
* @return self
|
||||
*/
|
||||
public function addGroup(string $key): self
|
||||
{
|
||||
|
||||
$this->metrics[] = [
|
||||
'group' => $key,
|
||||
];
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends metrics to the usage worker.
|
||||
*
|
||||
|
||||
@@ -78,7 +78,6 @@ class UsageDump extends Action
|
||||
/**
|
||||
* End temp bug fallback
|
||||
*/
|
||||
|
||||
$numberOfKeys = !empty($stats['keys']) ? count($stats['keys']) : 0;
|
||||
$receivedAt = $stats['receivedAt'] ?? 'NONE';
|
||||
if ($numberOfKeys === 0) {
|
||||
|
||||
Reference in new issue
Block a user