Skip to content

Commit 3051c3d

Browse files
committed
review comments
1 parent e55b783 commit 3051c3d

File tree

3 files changed

+7
-29
lines changed

3 files changed

+7
-29
lines changed

client/telemetry/TelemetryEventClient.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -317,18 +317,6 @@ func (impl *TelemetryEventClientImpl) SendSummaryEvent(eventType string) error {
317317
payload.PhysicalClusterCount, payload.IsolatedClusterCount = impl.getClusterCounts()
318318
payload.ActiveUsersLast30Days = impl.getActiveUsersLast30Days()
319319

320-
// Set FULL-mode only metrics to 0 for EA mode
321-
payload.DevtronAppCount = 0
322-
payload.JobCount = 0
323-
payload.JobPipelineCount = 0
324-
payload.JobPipelineTriggeredLast24h = 0
325-
payload.JobPipelineSucceededLast24h = 0
326-
payload.UserCreatedPluginCount = 0
327-
payload.PolicyCount = 0
328-
payload.AppliedPolicyRowCount = 0
329-
payload.GitOpsPipelineCount = 0
330-
payload.NoGitOpsPipelineCount = 0
331-
332320
payload.ClusterProvider, err = impl.GetCloudProvider()
333321
if err != nil {
334322
impl.logger.Errorw("error while getting cluster provider", "error", err)

client/telemetry/bean.go

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,10 @@ type TelemetryEventEA struct {
7676
ExternalHelmAppClusterCount map[int32]int `json:"ExternalHelmAppClusterCount,omitempty"`
7777
ClusterProvider string `json:"clusterProvider,omitempty"`
7878
// New telemetry fields
79-
HelmAppCount int `json:"helmAppCount,omitempty"`
80-
DevtronAppCount int `json:"devtronAppCount,omitempty"`
81-
JobCount int `json:"jobCount,omitempty"`
82-
JobPipelineCount int `json:"jobPipelineCount,omitempty"`
83-
JobPipelineTriggeredLast24h int `json:"jobPipelineTriggeredLast24h,omitempty"`
84-
JobPipelineSucceededLast24h int `json:"jobPipelineSucceededLast24h,omitempty"`
85-
UserCreatedPluginCount int `json:"userCreatedPluginCount,omitempty"`
86-
PolicyCount int `json:"policyCount,omitempty"`
87-
AppliedPolicyRowCount int `json:"appliedPolicyRowCount,omitempty"`
88-
PhysicalClusterCount int `json:"physicalClusterCount,omitempty"`
89-
IsolatedClusterCount int `json:"isolatedClusterCount,omitempty"`
90-
ActiveUsersLast30Days int `json:"activeUsersLast30Days,omitempty"`
91-
GitOpsPipelineCount int `json:"gitOpsPipelineCount,omitempty"`
92-
NoGitOpsPipelineCount int `json:"noGitOpsPipelineCount,omitempty"`
79+
HelmAppCount int `json:"helmAppCount,omitempty"`
80+
PhysicalClusterCount int `json:"physicalClusterCount,omitempty"`
81+
IsolatedClusterCount int `json:"isolatedClusterCount,omitempty"`
82+
ActiveUsersLast30Days int `json:"activeUsersLast30Days,omitempty"`
9383
}
9484

9585
const AppsCount int = 50

client/telemetry/telemetryQueriesExtended.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (impl *TelemetryEventClientImplExtended) getPolicyCount() int {
8282
globalPolicies, err := impl.cvePolicyRepository.GetGlobalPolicies()
8383
if err != nil {
8484
impl.logger.Errorw("error getting global CVE policies", "err", err)
85-
return 0
85+
return -1
8686
}
8787
return len(globalPolicies)
8888
}
@@ -128,10 +128,10 @@ func (impl *TelemetryEventClientImplExtended) helmPipelineCount() int {
128128

129129
// getJobPipelineCount returns 0 for now as implementation is not yet available
130130
func (impl *TelemetryEventClientImplExtended) getJobPipelineCount() int {
131-
return 0
131+
return -1
132132
}
133133

134134
// getAppliedPolicyRowCount returns 0 for now as implementation is not yet available
135135
func (impl *TelemetryEventClientImplExtended) getAppliedPolicyRowCount() int {
136-
return 0
136+
return -1
137137
}

0 commit comments

Comments
 (0)