Open gedw99 opened 5 months ago
I agree that this would be nice. I did some research and it doesn't seem like there is an easy way to get the os version on all platforms; if you can find a way to do that, that would be great! There is some discussion on this thread: https://groups.google.com/g/golang-nuts/c/NzEPGqlHIYQ.
the requirement is for web, desktop and mobile I presume ?
I had a look and there is no obvious packages out there that do this sniffin for us.
So I think k this just not worth the heavy effort for such small returns.
Yep, we need web, desktop, and mobile. Web should be easy, as we can just use the user agent string. I'm not sure about the other platforms though. I think it would be nice to have the OS version and the version of the graphics driver, but it isn't a very high priority, so I will leave this open but mark it as low priority, and we can come back to it later.
Yep I agree. We can probably do this in 2 phases and get a very basic Desktop and Mobile sniffer going. There is no golang package out there that I saw.
I saw that the Open Telemetry package has a data type for collecting this data actually too. So can dovetail it with that if we want later. "os.version" is the links below, and other meta data.
https://opentelemetry.io/docs/specs/semconv/resource/os/
https://github.com/open-telemetry/opentelemetry-go/blob/main/semconv/v1.9.0/resource.go
For web there are some good packages with no dependencies in golang. These are server side detectors of course.
Yep, we don't want to depend on any server side things. I can definitely do the web version information soon once I finish this configuration rewrite, and if you can figure out a native way to get the desktop/mobile version, I would consider a PR for that.
Got it . I will work on the desktop / mobile. Very doable.
I implemented this on web in 6535cc3 using userAgent
with a new system.App.SystemInfo
method that can also be implemented on other platforms.
Describe the bug
Here is what we get currently on this version in a crash log.
Its very good, but often there are bugs that are different for different versions of an OS, so it would be useful if we also collect the OS version.
It would be good too because we MAY at runtime have to sniff the OS version and do something slightly different for workarounds. This is common int he games industry where different OS versions and even different graphics card models can require special hack fixes.
Hence the OS version code can be used at runtime too. SO we are reusing the code.
How to reproduce
make something crash and see the logs.
Example code
No response
Relevant output
No response
Platform
macOS