Move mgo.Session deferred-Close() to after the if-nil check. Calling .Close() on a nil crashes the exporter
Move mgo.Session deferred-Close() to after the if-nil check. Calling .Close() on a nil crashes the exporter

timvaillancourt/mongodb_exporter