feat: add automatic system context to all events (#167)

* feat: add automatic OS detection to all events

* fixes

* Add android and ios mappings for OS names

* add go_version, os_version and os_distro

* fix: target master branch in CodeQL workflow

---------

Co-authored-by: Manoel Aranda Neto <[email protected]>
This commit is contained in:
Parin Porecha
2026-03-23 17:40:38 +01:00
committed by GitHub
co-authored by Manoel Aranda Neto
parent ac804e294e
commit 73785c570c
26 changed files with 357 additions and 64 deletions
+17
View File
@@ -0,0 +1,17 @@
//go:build windows
package posthog
import (
"fmt"
"golang.org/x/sys/windows"
)
func getOSInfo() osInfo {
ver := windows.RtlGetVersion()
return osInfo{
Name: "Windows",
Version: fmt.Sprintf("%d.%d.%d", ver.MajorVersion, ver.MinorVersion, ver.BuildNumber),
}
}