-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:
The client metadata OS type is currently constructed from the std::env::OS constant, which only provides limited visibility into the actual OS being used. From the docs, these are the only supported values for this constant:
- linux
- macos
- ios
- freebsd
- dragonfly
- netbsd
- openbsd
- solaris
- android
- windows
If we instead use the type returned from the os_info crate, which we already use to get the version and other information, the Linux distribution would be included in the metadata instead / in addition to "Linux". This is helpful because currently the version we provide corresponds to the distribution, but we don't include which distribution is being used.
e.g. this is the metadata used on Ubuntu 20.04
{ "driver": Document({ "name": String( "mongo-rust-driver", ), "version": String( "2.3.0", ), }), "os": Document({ "type": String( "linux", ), "architecture": String( "x86_64", ), "version": String( "20.04", ), }), "platform": String( "rustc 1.59.0 (9d1b2106e 2022-02-23) with tokio", ), }