telemetry

package
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2025 License: Apache-2.0 Imports: 50 Imported by: 13

Documentation

Index

Constants

View Source
const (
	SkippedOnboardingConst = "SkippedOnboarding"
	AdminEmailIdConst      = "admin"
)
View Source
const (
	POLICY_TYPE_DEPLOYMENT_WINDOW  = "DEPLOYMENT_WINDOW"
	POLICY_TYPE_APPROVAL           = "APPROVAL"
	POLICY_TYPE_PLUGIN             = "PLUGIN"
	POLICY_TYPE_LOCK_CONFIGURATION = "LOCK_CONFIGURATION"
)

Policy type constants

View Source
const (
	DEPLOYMENT_TYPE_ARGOCD = "argo_cd"
	DEPLOYMENT_TYPE_HELM   = "helm"
)

Deployment type constants

View Source
const (
	BUILD_TYPE_MANAGED_DOCKERFILE = "MANAGED_DOCKERFILE_BUILD_TYPE"
	BUILD_TYPE_BUILDPACK          = "BUILDPACK_BUILD_TYPE"
)

Build type constants

View Source
const (
	MERGE_STRATEGY_PATCH   = "patch"
	MERGE_STRATEGY_REPLACE = "replace"
)

Merge strategy constants

View Source
const (
	CONFIG_MAP_TYPE_EXTERNAL = "true"
	CONFIG_MAP_TYPE_INTERNAL = "false"
)

Config map type constants

View Source
const AppsCount int = 50

Variables

This section is empty.

Functions

This section is empty.

Types

type TelemetryConfig added in v0.6.28

type TelemetryConfig struct {
	// contains filtered or unexported fields
}

type TelemetryEventClient

type TelemetryEventClient interface {
	GetTelemetryMetaInfo() (*TelemetryMetaInfo, error)
	SendTelemetryInstallEventEA() (*TelemetryEventType, error)
	SendTelemetryDashboardAccessEvent() error
	SendTelemetryDashboardLoggedInEvent() error
	SendGenericTelemetryEvent(eventType string, prop map[string]interface{}) error
	SendSummaryEvent(eventType string) error
}

type TelemetryEventClientImpl

type TelemetryEventClientImpl struct {
	K8sUtil *k8s.K8sServiceImpl
	// contains filtered or unexported fields
}

func NewTelemetryEventClientImpl

func NewTelemetryEventClientImpl(logger *zap.SugaredLogger, client *http.Client, clusterService cluster.ClusterService,
	K8sUtil *k8s.K8sServiceImpl, aCDAuthConfig *util3.ACDAuthConfig, userService user2.UserService,
	attributeRepo repository.AttributesRepository, ssoLoginService sso.SSOLoginService,
	posthog *posthogTelemetry.PosthogClient, ucid ucidService.Service,
	moduleRepository moduleRepo.ModuleRepository, serverDataStore *serverDataStore.ServerDataStore,
	userAuditService user2.UserAuditService, helmAppClient gRPC.HelmAppClient,
	cloudProviderIdentifierService cloudProviderIdentifier.ProviderIdentifierService, cronLogger *cron3.CronLoggerImpl,
	installedAppReadService installedAppReader.InstalledAppReadServiceEA,
	envVariables *util.EnvironmentVariables,
	userAttributesRepository repository.UserAttributesRepository) (*TelemetryEventClientImpl, error)

func (*TelemetryEventClientImpl) EnqueueGenericPostHogEvent added in v0.5.3

func (impl *TelemetryEventClientImpl) EnqueueGenericPostHogEvent(ucid string, eventType string, prop map[string]interface{}) error

func (*TelemetryEventClientImpl) EnqueuePostHog added in v0.3.16

func (impl *TelemetryEventClientImpl) EnqueuePostHog(ucid string, eventType TelemetryEventType, prop map[string]interface{}) error

func (*TelemetryEventClientImpl) GetCloudProvider added in v0.6.28

func (impl *TelemetryEventClientImpl) GetCloudProvider() (string, error)

func (*TelemetryEventClientImpl) GetSummaryDetailsForTelemetry added in v1.8.0

func (impl *TelemetryEventClientImpl) GetSummaryDetailsForTelemetry() (cluster []bean.ClusterBean, user []bean2.UserInfo,
	k8sServerVersion *version.Info, hostURL bool, ssoSetup bool, HelmAppAccessCount string, ChartStoreVisitCount string,
	SkippedOnboarding bool, HelmAppUpdateCounter string, helmChartSuccessfulDeploymentCount int, ExternalHelmAppClusterCount map[int32]int)

func (*TelemetryEventClientImpl) GetTelemetryMetaInfo added in v0.2.15

func (impl *TelemetryEventClientImpl) GetTelemetryMetaInfo() (*TelemetryMetaInfo, error)

func (*TelemetryEventClientImpl) HeartbeatEventForTelemetry

func (impl *TelemetryEventClientImpl) HeartbeatEventForTelemetry()

func (*TelemetryEventClientImpl) SendGenericTelemetryEvent added in v0.5.3

func (impl *TelemetryEventClientImpl) SendGenericTelemetryEvent(eventType string, prop map[string]interface{}) error

func (*TelemetryEventClientImpl) SendSummaryEvent added in v0.6.0

func (impl *TelemetryEventClientImpl) SendSummaryEvent(eventType string) error

func (*TelemetryEventClientImpl) SendTelemetryDashboardAccessEvent added in v0.3.24

func (impl *TelemetryEventClientImpl) SendTelemetryDashboardAccessEvent() error

func (*TelemetryEventClientImpl) SendTelemetryDashboardLoggedInEvent added in v0.3.24

func (impl *TelemetryEventClientImpl) SendTelemetryDashboardLoggedInEvent() error

func (*TelemetryEventClientImpl) SendTelemetryInstallEventEA added in v0.3.24

func (impl *TelemetryEventClientImpl) SendTelemetryInstallEventEA() (*TelemetryEventType, error)

func (*TelemetryEventClientImpl) StopCron

func (impl *TelemetryEventClientImpl) StopCron()

func (*TelemetryEventClientImpl) SummaryEventForTelemetryEA added in v0.3.25

func (impl *TelemetryEventClientImpl) SummaryEventForTelemetryEA()

type TelemetryEventClientImplExtended added in v0.3.16

type TelemetryEventClientImplExtended struct {
	*TelemetryEventClientImpl
	// contains filtered or unexported fields
}

func NewTelemetryEventClientImplExtended added in v0.3.25

func NewTelemetryEventClientImplExtended(logger *zap.SugaredLogger, client *http.Client, clusterService cluster.ClusterService,
	K8sUtil *util2.K8sServiceImpl, aCDAuthConfig *util3.ACDAuthConfig,
	environmentService environment.EnvironmentService, userService user2.UserService,
	appListingRepository repository.AppListingRepository, posthog *posthogTelemetry.PosthogClient, ucid ucidService.Service,
	ciPipelineConfigReadService ciConfig.CiPipelineConfigReadService, pipelineRepository pipelineConfig.PipelineRepository,
	gitProviderRepository repository3.GitProviderRepository, attributeRepo repository.AttributesRepository,
	ssoLoginService sso.SSOLoginService, appRepository app.AppRepository,
	ciWorkflowRepository pipelineConfig.CiWorkflowRepository, cdWorkflowRepository pipelineConfig.CdWorkflowRepository,
	dockerArtifactStoreRepository dockerRegistryRepository.DockerArtifactStoreRepository,
	gitMaterialReadService read.GitMaterialReadService, ciTemplateRepository pipelineConfig.CiTemplateRepository,
	chartRepository chartRepoRepository.ChartRepository, userAuditService user2.UserAuditService,
	ciBuildConfigService pipeline.CiBuildConfigService, moduleRepository moduleRepo.ModuleRepository, serverDataStore *serverDataStore.ServerDataStore,
	helmAppClient client.HelmAppClient, installedAppReadService installedAppReader.InstalledAppReadService, userAttributesRepository repository.UserAttributesRepository,
	cloudProviderIdentifierService cloudProviderIdentifier.ProviderIdentifierService, cronLogger *cron3.CronLoggerImpl,
	gitOpsConfigReadService config.GitOpsConfigReadService, envVariables *util.EnvironmentVariables,

	pluginRepository pluginRepository.GlobalPluginRepository,
	cvePolicyRepository cvePolicyRepository.CvePolicyRepository,
	defaultAuthPolicyRepository authPolicyRepository.DefaultAuthPolicyRepository,
	rbacPolicyRepository authPolicyRepository.RbacPolicyDataRepository) (*TelemetryEventClientImplExtended, error)

func (*TelemetryEventClientImplExtended) SendSummaryEvent added in v0.6.0

func (impl *TelemetryEventClientImplExtended) SendSummaryEvent(eventType string) error

func (*TelemetryEventClientImplExtended) SummaryEventForTelemetry added in v0.3.16

func (impl *TelemetryEventClientImplExtended) SummaryEventForTelemetry()

type TelemetryEventDto

type TelemetryEventDto struct {
	UCID                                 string             `json:"ucid"` //unique client id
	Timestamp                            time.Time          `json:"timestamp"`
	EventMessage                         string             `json:"eventMessage,omitempty"`
	EventType                            TelemetryEventType `json:"eventType"`
	ProdAppCount                         int                `json:"prodAppCount,omitempty"`
	NonProdAppCount                      int                `json:"nonProdAppCount,omitempty"`
	UserCount                            int                `json:"userCount,omitempty"`
	EnvironmentCount                     int                `json:"environmentCount,omitempty"`
	ClusterCount                         int                `json:"clusterCount,omitempty"`
	CiCreatedPerDay                      int                `json:"ciCreatedPerDay"`
	CdCreatedPerDay                      int                `json:"cdCreatedPerDay"`
	CiDeletedPerDay                      int                `json:"ciDeletedPerDay"`
	CdDeletedPerDay                      int                `json:"cdDeletedPerDay"`
	CiTriggeredPerDay                    int                `json:"ciTriggeredPerDay"`
	CdTriggeredPerDay                    int                `json:"cdTriggeredPerDay"`
	HelmChartCount                       int                `json:"helmChartCount,omitempty"`
	SecurityScanCountPerDay              int                `json:"securityScanCountPerDay,omitempty"`
	GitAccountsCount                     int                `json:"gitAccountsCount,omitempty"`
	GitOpsCount                          int                `json:"gitOpsCount,omitempty"`
	RegistryCount                        int                `json:"registryCount,omitempty"`
	HostURL                              bool               `json:"hostURL,omitempty"`
	SSOLogin                             bool               `json:"ssoLogin,omitempty"`
	AppCount                             int                `json:"appCount,omitempty"`
	AppsWithGitRepoConfigured            int                `json:"appsWithGitRepoConfigured,omitempty"`
	AppsWithDockerConfigured             int                `json:"appsWithDockerConfigured,omitempty"`
	AppsWithDeploymentTemplateConfigured int                `json:"appsWithDeploymentTemplateConfigured,omitempty"`
	AppsWithCiPipelineConfigured         int                `json:"appsWithCiPipelineConfigured,omitempty"`
	AppsWithCdPipelineConfigured         int                `json:"appsWithCdPipelineConfigured,omitempty"`
	Build                                bool               `json:"build,omitempty"`
	Deployment                           bool               `json:"deployment,omitempty"`
	ServerVersion                        string             `json:"serverVersion,omitempty"`
	DevtronGitVersion                    string             `json:"devtronGitVersion,omitempty"`
	DevtronVersion                       string             `json:"devtronVersion,omitempty"`
	DevtronMode                          string             `json:"devtronMode,omitempty"`
	InstalledIntegrations                []string           `json:"installedIntegrations,omitempty"`
	InstallFailedIntegrations            []string           `json:"installFailedIntegrations,omitempty"`
	InstallTimedOutIntegrations          []string           `json:"installTimedOutIntegrations,omitempty"`
	InstallingIntegrations               []string           `json:"installingIntegrations,omitempty"`
	DevtronReleaseVersion                string             `json:"devtronReleaseVersion,omitempty"`
	LastLoginTime                        time.Time          `json:"LastLoginTime,omitempty"`
	SelfDockerfileCount                  int                `json:"selfDockerfileCount"`
	ManagedDockerfileCount               int                `json:"managedDockerfileCount"`
	BuildPackCount                       int                `json:"buildPackCount"`
	SelfDockerfileSuccessCount           int                `json:"selfDockerfileSuccessCount"`
	SelfDockerfileFailureCount           int                `json:"selfDockerfileFailureCount"`
	ManagedDockerfileSuccessCount        int                `json:"managedDockerfileSuccessCount"`
	ManagedDockerfileFailureCount        int                `json:"managedDockerfileFailureCount"`
	BuildPackSuccessCount                int                `json:"buildPackSuccessCount"`
	BuildPackFailureCount                int                `json:"buildPackFailureCount"`
	HelmAppAccessCounter                 string             `json:"HelmAppAccessCounter,omitempty"`
	ChartStoreVisitCount                 string             `json:"ChartStoreVisitCount,omitempty"`
	SkippedOnboarding                    bool               `json:"SkippedOnboarding"`
	HelmAppUpdateCounter                 string             `json:"HelmAppUpdateCounter,omitempty"`
	HelmChartSuccessfulDeploymentCount   int                `json:"helmChartSuccessfulDeploymentCount,omitempty"`
	ExternalHelmAppClusterCount          map[int32]int      `json:"ExternalHelmAppClusterCount"`
	ClusterProvider                      string             `json:"clusterProvider,omitempty"`
	// New telemetry fields
	HelmAppCount                           int      `json:"helmAppCount,omitempty"`
	DevtronAppCount                        int      `json:"devtronAppCount,omitempty"`
	JobCount                               int      `json:"jobCount,omitempty"`
	JobPipelineCount                       int      `json:"jobPipelineCount,omitempty"`
	JobPipelineTriggeredLast24h            int      `json:"jobPipelineTriggeredLast24h,omitempty"`
	JobPipelineSucceededLast24h            int      `json:"jobPipelineSucceededLast24h,omitempty"`
	UserCreatedPluginCount                 int      `json:"userCreatedPluginCount,omitempty"`
	DeploymentWindowPolicyCount            int      `json:"deploymentWindowPolicyCount,omitempty"`
	ApprovalPolicyCount                    int      `json:"approvalPolicyCount,omitempty"`
	PluginPolicyCount                      int      `json:"pluginPolicyCount,omitempty"`
	TagsPolicyCount                        int      `json:"tagsPolicyCount,omitempty"`
	FilterConditionPolicyCount             int      `json:"filterConditionPolicyCount,omitempty"`
	LockDeploymentConfigurationPolicyCount int      `json:"lockDeploymentConfigurationPolicyCount,omitempty"`
	AppliedPolicyRowCount                  int      `json:"appliedPolicyRowCount,omitempty"`
	PhysicalClusterCount                   int      `json:"physicalClusterCount,omitempty"`
	IsolatedClusterCount                   int      `json:"isolatedClusterCount,omitempty"`
	ActiveUsersLast30Days                  int      `json:"activeUsersLast30Days,omitempty"`
	GitOpsPipelineCount                    int      `json:"gitOpsPipelineCount,omitempty"`
	HelmPipelineCount                      int      `json:"helmPipelineCount,omitempty"`
	ProjectsWithZeroAppsCount              int      `json:"projectsWithZeroAppsCount,omitempty"`
	AppsWithPropagationTagsCount           int      `json:"appsWithPropagationTagsCount,omitempty"`
	AppsWithNonPropagationTagsCount        int      `json:"appsWithNonPropagationTagsCount,omitempty"`
	AppsWithDescriptionCount               int      `json:"appsWithDescriptionCount,omitempty"`
	AppsWithCatalogDataCount               int      `json:"appsWithCatalogDataCount,omitempty"`
	AppsWithReadmeDataCount                int      `json:"appsWithReadmeDataCount,omitempty"`
	HighestEnvironmentCountInApp           int      `json:"highestEnvironmentCountInApp,omitempty"`
	HighestAppCountInEnvironment           int      `json:"highestAppCountInEnvironment,omitempty"`
	HighestWorkflowCountInApp              int      `json:"highestWorkflowCountInApp,omitempty"`
	HighestEnvironmentCountInWorkflow      int      `json:"highestEnvironmentCountInWorkflow,omitempty"`
	HighestGitRepoCountInApp               int      `json:"highestGitRepoCountInApp,omitempty"`
	AppsWithIncludeExcludeFilesCount       int      `json:"appsWithIncludeExcludeFilesCount,omitempty"`
	DockerfileLanguagesList                []string `json:"dockerfileLanguagesList,omitempty"`
	BuildpackLanguagesList                 []string `json:"buildpackLanguagesList,omitempty"`
	AppsWithDeploymentChartCount           int      `json:"appsWithDeploymentChartCount,omitempty"`
	AppsWithRolloutChartCount              int      `json:"appsWithRolloutChartCount,omitempty"`
	AppsWithStatefulsetCount               int      `json:"appsWithStatefulsetCount,omitempty"`
	AppsWithJobsCronjobsCount              int      `json:"appsWithJobsCronjobsCount,omitempty"`
	EnvironmentsWithPatchStrategyCount     int      `json:"environmentsWithPatchStrategyCount,omitempty"`
	EnvironmentsWithReplaceStrategyCount   int      `json:"environmentsWithReplaceStrategyCount,omitempty"`
	ExternalConfigMapCount                 int      `json:"externalConfigMapCount,omitempty"`
	InternalConfigMapCount                 int      `json:"internalConfigMapCount,omitempty"`
}

type TelemetryEventEA added in v0.3.16

type TelemetryEventEA struct {
	UCID                               string             `json:"ucid"` //unique client id
	Timestamp                          time.Time          `json:"timestamp"`
	EventMessage                       string             `json:"eventMessage,omitempty"`
	EventType                          TelemetryEventType `json:"eventType"`
	ServerVersion                      string             `json:"serverVersion,omitempty"`
	UserCount                          int                `json:"userCount,omitempty"`
	ClusterCount                       int                `json:"clusterCount,omitempty"`
	HostURL                            bool               `json:"hostURL,omitempty"`
	SSOLogin                           bool               `json:"ssoLogin,omitempty"`
	DevtronVersion                     string             `json:"devtronVersion,omitempty"`
	DevtronMode                        string             `json:"devtronMode,omitempty"`
	InstalledIntegrations              []string           `json:"installedIntegrations,omitempty"`
	InstallFailedIntegrations          []string           `json:"installFailedIntegrations,omitempty"`
	InstallTimedOutIntegrations        []string           `json:"installTimedOutIntegrations,omitempty"`
	LastLoginTime                      time.Time          `json:"LastLoginTime,omitempty"`
	InstallingIntegrations             []string           `json:"installingIntegrations,omitempty"`
	DevtronReleaseVersion              string             `json:"devtronReleaseVersion,omitempty"`
	HelmAppAccessCounter               string             `json:"HelmAppAccessCounter,omitempty"`
	HelmAppUpdateCounter               string             `json:"HelmAppUpdateCounter,omitempty"`
	ChartStoreVisitCount               string             `json:"ChartStoreVisitCount,omitempty"`
	SkippedOnboarding                  bool               `json:"SkippedOnboarding"`
	HelmChartSuccessfulDeploymentCount int                `json:"helmChartSuccessfulDeploymentCount,omitempty"`
	ExternalHelmAppClusterCount        map[int32]int      `json:"ExternalHelmAppClusterCount,omitempty"`
	ClusterProvider                    string             `json:"clusterProvider,omitempty"`
	// New telemetry fields
	HelmAppCount          int `json:"helmAppCount,omitempty"`
	PhysicalClusterCount  int `json:"physicalClusterCount,omitempty"`
	IsolatedClusterCount  int `json:"isolatedClusterCount,omitempty"`
	ActiveUsersLast30Days int `json:"activeUsersLast30Days,omitempty"`
}

type TelemetryEventType

type TelemetryEventType string
const (
	Heartbeat                    TelemetryEventType = "Heartbeat"
	InstallationStart            TelemetryEventType = "InstallationStart"
	InstallationInProgress       TelemetryEventType = "InstallationInProgress"
	InstallationInterrupt        TelemetryEventType = "InstallationInterrupt"
	InstallationSuccess          TelemetryEventType = "InstallationSuccess"
	InstallationFailure          TelemetryEventType = "InstallationFailure"
	UpgradeStart                 TelemetryEventType = "UpgradeStart"
	UpgradeInProgress            TelemetryEventType = "UpgradeInProgress"
	UpgradeInterrupt             TelemetryEventType = "UpgradeInterrupt"
	UpgradeSuccess               TelemetryEventType = "UpgradeSuccess"
	UpgradeFailure               TelemetryEventType = "UpgradeFailure"
	Summary                      TelemetryEventType = "Summary"
	InstallationApplicationError TelemetryEventType = "InstallationApplicationError"
	DashboardAccessed            TelemetryEventType = "DashboardAccessed"
	DashboardLoggedIn            TelemetryEventType = "DashboardLoggedIn"
	SIG_TERM                     TelemetryEventType = "SIG_TERM"
)

type TelemetryMetaInfo added in v0.2.15

type TelemetryMetaInfo struct {
	Url    string `json:"url,omitempty"`
	UCID   string `json:"ucid,omitempty"`
	ApiKey string `json:"apiKey,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL