@unguiculus commented on Apr 12
Adds the following flags:
I left the defaults as they were, but I think it might be a good idea to change them as well. The MongoDB driver has a default for the sync timeout of 7 seconds (session.go#L1706) and a default value for the socket timeout of one minute (session.go#L1716) whereas the exporter uses a much longer default for the sync timeout of one minute and an extremely short default of 3 seconds for the socket timeout.
We've found that the default socket timeout is way too short when you have a recovering replica. It may take quite a bit to connect. You want to make sure to get your metrics, so I'd rather set the timeout higher.