mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-10-12 05:21:30 +08:00

* chore: changed lib * chore: changed lib * chore: changed lib * chore: changed lib * chore: changes in params * chore: changes in params * chore: moving telemetry to a separate package * feat: enabling telemetry via env var * chore: removing posthog api_key * feat: send heartbeat every 6hr * feat: enabled version in application * feat: added getter and setter apis and struct for user preferences * feat: added version to properties to event * feat: added apis to set and get user preferences and get version * chore: refactored get and set userPreferences apis to dao pattern * chore: added checks for telemetry enabled and anonymous during initialization * chore: changed anonymous user functionality * chore: sanitization * chore: added uuid for userPreferences to send when user is anonymous
25 lines
459 B
Go
25 lines
459 B
Go
package version
|
|
|
|
import (
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
// These fields are set during an official build
|
|
// Global vars set from command-line arguments
|
|
var (
|
|
version = "--"
|
|
buildhash = "--"
|
|
buildtime = "--"
|
|
)
|
|
|
|
//PrintVersionInfo displays the kyverno version - git version
|
|
func PrintVersionInfo() {
|
|
zap.S().Info("Version: ", version)
|
|
zap.S().Info("BuildHash: ", buildhash)
|
|
zap.S().Info("BuildTime: ", buildtime)
|
|
}
|
|
|
|
func GetVersion() string {
|
|
return version
|
|
}
|