Report more Operating System details such as OS version
Currently the SDK reports the Operating System type taken from runtime.GOOS. It could report more OS details such as version.
The use cases:
- programs that are distributed to end users and report errors back
- programs that run on heterogeneous environments (a generalization of the above, but also e.g. a web server running on different types of VMs)
(Extracted from #187)
gathering os information from uname syscall is enough?
gathering os information from uname syscall is enough?
I believe for Linux/macOS we can read from https://godoc.org/golang.org/x/sys/unix#Utsname And for Windows from https://godoc.org/golang.org/x/sys/windows#OsVersionInfoEx
Haven't tested, but seems your PR is in a good direction 👍
I’m not familiar it yet about windows os syscall but it’s sound interesting for me to try.
I don’t know how to write unit test for it because it’s depend on os specific, including os version. Do you have any idea about it?
You can use build constraints on test files to run different tests on different OSs. Of course, you then need to run your tests on different OSs so in this case it might be better to just have a few tests with the syscall mocked out.
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀