File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1317,7 +1317,7 @@ private function validateMetricsBatch(array $metrics): void
13171317
13181318 // Validate tenant when provided (metric-level tenant overrides adapter tenant)
13191319 if (array_key_exists ('tenant ' , $ metricData )) {
1320- $ tenantValue = $ metricData ['$ tenant ' ];
1320+ $ tenantValue = $ metricData ['tenant ' ];
13211321
13221322 if ($ tenantValue !== null ) {
13231323 if (is_int ($ tenantValue )) {
@@ -1753,6 +1753,7 @@ private function parseQueries(array $queries): array
17531753 $ this ->validateAttributeName ($ attribute );
17541754 $ escapedAttr = $ this ->escapeIdentifier ($ attribute );
17551755 $ paramName = 'param_ ' . $ paramCounter ++;
1756+ $ singleValue = null ;
17561757 if ($ attribute === 'time ' ) {
17571758 if (is_array ($ values )) {
17581759 /** @var \DateTime|string|null $singleValue */
@@ -1774,6 +1775,7 @@ private function parseQueries(array $queries): array
17741775 $ this ->validateAttributeName ($ attribute );
17751776 $ escapedAttr = $ this ->escapeIdentifier ($ attribute );
17761777 $ paramName = 'param_ ' . $ paramCounter ++;
1778+ $ singleValue = null ;
17771779 if ($ attribute === 'time ' ) {
17781780 if (is_array ($ values )) {
17791781 /** @var \DateTime|string|null $singleValue */
Original file line number Diff line number Diff line change @@ -45,11 +45,12 @@ public function healthCheck(): array
4545
4646 // Check if collection exists
4747 $ collectionName = $ this ->collection ?? 'usage ' ;
48- if (! $ this ->db ->getCollection ($ collectionName )->isEmpty ()) {
48+ if ($ this ->db ->getCollection ($ collectionName )->isEmpty ()) {
4949 return [
50- 'healthy ' => true ,
50+ 'healthy ' => false ,
5151 'database ' => $ databaseName ,
52- 'collection ' => $ collectionName
52+ 'collection ' => $ collectionName ,
53+ 'error ' => "Collection ' {$ collectionName }' is missing or empty in database ' {$ databaseName }' "
5354 ];
5455 }
5556
You can’t perform that action at this time.
0 commit comments