feat(analytics): adding google analytics for ZFSPV

Whenever a volume is provisioned and de-provisioned we will send a google event with mainly following details :
1.    pvName (will shown as app title in google analytics)
2.    size of the volume
3.    event type : volume-provision, volume-deprovision
4.    storage type zfs-localpv
5.    replicacount as 1
6.    ClientId as default namespace uuid

Apart from this, we send the event once in 24 hr, which will have some info like number of nodes, node type, kubernetes version etc.

This metric is cotrolled by OPENEBS_IO_ENABLE_ANALYTICS env. We can set it to false if we don't want to send the metrics.

Signed-off-by: Pawan <pawan@mayadata.io>
This commit is contained in:
Pawan 2020-02-26 11:31:24 +05:30 committed by Kiran Mova
parent 0fc86d843b
commit d608dbacd8
28 changed files with 1731 additions and 18 deletions

View file

@ -108,6 +108,10 @@ func GetGitCommit() string {
return strings.TrimSpace(string(output))
}
func GetVersionDetails() string {
return "zfs-" + strings.Join([]string{Get(), GetGitCommit()[0:7]}, "-")
}
// Verbose returns version details with git
// commit info
func Verbose() string {