You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Purpose**: Detect slow queries and high-latency collections.
118
118
119
+
**Note on Collection Families**: To reduce metric cardinality, dynamic collection names are grouped into families. For example:
120
+
-`events:projectId` → `events`
121
+
-`dailyEvents:projectId` → `dailyEvents`
122
+
-`repetitions:projectId` → `repetitions`
123
+
-`membership:userId` → `membership`
124
+
-`team:workspaceId` → `team`
125
+
126
+
This prevents metric explosion when dealing with thousands of projects, users, or workspaces, while still providing meaningful insights into collection performance patterns.
127
+
119
128
#### hawk_mongo_command_errors_total (Counter)
120
129
121
130
Counter of failed MongoDB commands grouped by command and error code.
@@ -173,6 +182,7 @@ The metrics implementation uses the `prom-client` library and consists of:
173
182
- Implements MongoDB command monitoring
174
183
- Tracks command duration and errors
175
184
- Uses MongoDB's command monitoring events
185
+
- Extracts collection families from dynamic collection names to reduce cardinality
0 commit comments