coinbase / mongobetween

Apache License 2.0
107 stars 45 forks source link

Use SDAM for MongoBetween #54

Closed d2army closed 1 year ago

d2army commented 1 year ago

The idea here is to enable SDAM(Server Discovery And Monitoring) on the MongoBetween side so it can report back metrics and logs on what it observes about server and topology changes on the Atlas side.

This will be helpful for understanding the state of the cluster from MongoBetween's perspective during times of connectivity issues.

SDAM References:

https://www.alexbevi.com/blog/2022/05/15/mongodb-driver-monitoring/#go

https://github.com/mongodb/specifications/blob/a9096ad069e8af0f5973c9d0ca75da57e4c63616/source/server-discovery-and-monitoring/server-discovery-and-monitoring-monitoring.rst#events

kounat commented 1 year ago

Could we move this to mongobetween/config/config.go?

Preferred place to place configuration options / hardcode any strings, and that's where we set the initial client options. Otherwise LGTM