@@ -78,6 +78,7 @@ type TelemetryEventClientImpl struct {
78
78
userAttributesRepository repository.UserAttributesRepository
79
79
cloudProviderIdentifierService cloudProviderIdentifier.ProviderIdentifierService
80
80
telemetryConfig TelemetryConfig
81
+ globalEnvVariables * util.GlobalEnvVariables
81
82
}
82
83
83
84
type TelemetryEventClient interface {
@@ -96,7 +97,8 @@ func NewTelemetryEventClientImpl(logger *zap.SugaredLogger, client *http.Client,
96
97
serverDataStore * serverDataStore.ServerDataStore , userAuditService user2.UserAuditService ,
97
98
helmAppClient gRPC.HelmAppClient ,
98
99
cloudProviderIdentifierService cloudProviderIdentifier.ProviderIdentifierService , cronLogger * cron3.CronLoggerImpl ,
99
- installedAppReadService installedAppReader.InstalledAppReadServiceEA ) (* TelemetryEventClientImpl , error ) {
100
+ installedAppReadService installedAppReader.InstalledAppReadServiceEA ,
101
+ envVariables * util.EnvironmentVariables ) (* TelemetryEventClientImpl , error ) {
100
102
cron := cron .New (
101
103
cron .WithChain (cron .Recover (cronLogger )))
102
104
cron .Start ()
@@ -118,6 +120,7 @@ func NewTelemetryEventClientImpl(logger *zap.SugaredLogger, client *http.Client,
118
120
installedAppReadService : installedAppReadService ,
119
121
cloudProviderIdentifierService : cloudProviderIdentifierService ,
120
122
telemetryConfig : TelemetryConfig {},
123
+ globalEnvVariables : envVariables .GlobalEnvVariables ,
121
124
}
122
125
123
126
watcher .HeartbeatEventForTelemetry ()
@@ -423,7 +426,7 @@ func (impl *TelemetryEventClientImpl) EnqueueGenericPostHogEvent(ucid string, ev
423
426
impl .PosthogClient .Client = client
424
427
}
425
428
}
426
- if impl .PosthogClient .Client != nil {
429
+ if impl .PosthogClient .Client != nil && ! impl . globalEnvVariables . IsAirGapEnvironment {
427
430
err := impl .PosthogClient .Client .Enqueue (posthog.Capture {
428
431
DistinctId : ucid ,
429
432
Event : eventType ,
0 commit comments