I noticed some count discrepancies in our production environment for connection error counts, and realized it was because we had multiple _nango_active_log records of the same type for one of the connections. This PR updates the count logic to count distinct connections so that each count doesn't take duplicates into account.
How I Tested It
Got a connection to have a _nango_active_log record (OK, I already had one sitting around)
Inserted a duplicate of that record with a new id.
Reviewed the count endpoint in the inspector to ensure it was returning the expected number of errors.
Describe your changes
I noticed some count discrepancies in our production environment for connection error counts, and realized it was because we had multiple _nango_active_log records of the same type for one of the connections. This PR updates the count logic to count distinct connections so that each count doesn't take duplicates into account.
How I Tested It
_nango_active_log
record (OK, I already had one sitting around)