mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
update cli telemetry
This commit is contained in:
@@ -1,23 +1,22 @@
|
||||
package telemetry
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/Infisical/infisical-merge/packages/util"
|
||||
"github.com/denisbrodbeck/machineid"
|
||||
"github.com/posthog/posthog-go"
|
||||
)
|
||||
|
||||
var POSTHOG_API_KEY_FOR_CLI string
|
||||
|
||||
type Telemetry struct {
|
||||
isEnabled bool
|
||||
posthogClient posthog.Client
|
||||
}
|
||||
|
||||
func NewTelemetry(telemetryIsEnabled bool) *Telemetry {
|
||||
posthogAPIKey := os.Getenv("POSTHOG_API_KEY_FOR_CLI")
|
||||
if posthogAPIKey != "" {
|
||||
if POSTHOG_API_KEY_FOR_CLI != "" {
|
||||
client, _ := posthog.NewWithConfig(
|
||||
posthogAPIKey,
|
||||
POSTHOG_API_KEY_FOR_CLI,
|
||||
posthog.Config{},
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user