github.com/ActiveState/cli@v0.0.0-20240508170324-6801f60cd051/internal/analytics/constants/constants.go (about) 1 package constants 2 3 // CfgSessionToken is the configuration key for the session token the installer sets 4 const CfgSessionToken = "sessionToken" 5 6 // CatRunCmd is the event category used for running commands 7 const CatRunCmd = "run-command" 8 9 // CatShim is the event category used for shimmed commands 10 const CatShim = "shim" 11 12 // CatBuild is the event category used for headchef builds 13 const CatBuild = "build" 14 15 // CatRuntimeDebug is the event category used for debugging runtime setup and usage. 16 // It should only be used to help diagnose where errors and dropoffs may be happening. 17 const CatRuntimeDebug = "runtime-debug" 18 19 // CatRuntimeUsage is the event category used for all runtime usage 20 const CatRuntimeUsage = "runtime-use" 21 22 // CatConfig is the event category used for all configuration events 23 const CatConfig = "config" 24 25 // CatUpdate is the event category used for all update events 26 const CatUpdates = "updates" 27 28 // CatInstaller is the event category used for installer events. 29 const CatInstaller = "installer" 30 31 // CatInstallerFunnel is the event category used for installer funnel events. 32 const CatInstallerFunnel = "installer-funnel" 33 34 // SrcStateTool is the event source for events sent by state. 35 const SrcStateTool = "State Tool" 36 37 // SrcStateService is the event source for events sent by state-svc. 38 const SrcStateService = "State Service" 39 40 // SrcStateInstaller is the event source for events sent by state-installer. 41 const SrcStateInstaller = "State Installer" 42 43 // SrcStateRemoteInstaller is the event source for events sent by state-remote-installer. 44 const SrcStateRemoteInstaller = "State Remote Installer" 45 46 // SrcOfflineInstaller is the event source for events sent by offline installers. 47 const SrcOfflineInstaller = "Offline Installer" 48 49 // SrcExecutor is the event source for events sent by executors. 50 const SrcExecutor = "Executor" 51 52 // ActRuntimeHeartbeat is the event action sent when a runtime is in use 53 const ActRuntimeHeartbeat = "heartbeat" 54 55 // ActRuntimeSuccess is the event action sent attempting to use a runtime 56 const ActRuntimeAttempt = "attempt" 57 58 // ActRuntimeStart is the event action sent when creating a runtime 59 const ActRuntimeStart = "start" 60 61 // ActRuntimeDelete is the event action sent when uninstalling a runtime 62 const ActRuntimeDelete = "delete" 63 64 // ActRuntimeCache is the event action sent when a runtime is constructed from the local cache alone 65 const ActRuntimeCache = "cache" 66 67 // ActRuntimeBuild is the event action sent when starting a remote build for the project 68 const ActRuntimeBuild = "build" 69 70 // ActRuntimeDownload is the event action sent before starting the download of artifacts for a runtime 71 const ActRuntimeDownload = "download" 72 73 // ActRuntimeSuccess is the event action sent when a runtime's environment has been successfully computed (for the first time) 74 const ActRuntimeSuccess = "success" 75 76 // ActRuntimeFailure is the event action sent when a failure occurred anytime during a runtime operation 77 const ActRuntimeFailure = "failure" 78 79 // ActConfigSet is the event action sent when a configuration value is set 80 const ActConfigSet = "set" 81 82 // ActConfigUnset is the event action sent when a configuration value is unset 83 const ActConfigUnset = "unset" 84 85 // ActConfigGet is the event action sent when determining if an update should be checked 86 const ActShouldUpdate = "should-autoupdate" 87 88 // ActConfigGet is the event action sent when an update is checked 89 const ActUpdateCheck = "update-check" 90 91 // ActUpdateDownload is the event action sent when an update retrieved 92 const ActUpdateDownload = "download" 93 94 // ActUpdateInstall is the event action sent when an update is installed 95 const ActUpdateInstall = "install" 96 97 // ActUpdateRelaunch is the event action sent after and update is installed and the state tool is relaunched 98 const ActUpdateRelaunch = "relaunch" 99 100 // LblRtFailUpdate is the label sent with an ActRuntimeFailure event if an error occurred during a runtime update 101 const LblRtFailUpdate = "update" 102 103 // CatPpmConversion is the event category used for ppm-conversion events 104 const CatPpmConversion = "ppm-conversion" 105 106 // CatPPMShimCmd is the event category used for PPM shim events 107 const CatPPMShimCmd = "ppm-shim" 108 109 // CatTutorial is the event category used for tutorial level events 110 const CatTutorial = "tutorial" 111 112 // CatCommandExit is the event category used to track the success of state commands 113 const CatCommandExit = "command-exit" 114 115 // CatCommandExit is the event category used to track the error that was returned from a command 116 const CatCommandError = "command-error" 117 118 // CatActivationFlow is for events that outline the activation flow 119 const CatActivationFlow = "activation" 120 121 // CatPrompt is for prompt events 122 const CatPrompt = "prompt" 123 124 // CatMist is for miscellaneous events 125 const CatMisc = "misc" 126 127 // CatStateSvc is for state-svc events 128 const CatStateSvc = "state-svc" 129 130 // CatPackageOp is for `state packages` events 131 const CatPackageOp = "package-operation" 132 133 // CatOfflineInstaller is the event category used for all data relating to offline installs and uninstalls 134 const CatOfflineInstaller = "offline-installer" 135 136 // ActOfflineInstallerStart is the event action for the offline installer/uninstaller being initiated 137 const ActOfflineInstallerStart = "start" 138 139 // ActOfflineInstallerFailure is the event action for the offline installer/uninstaller failing 140 const ActOfflineInstallerFailure = "failure" 141 142 // ActOfflineInstallerStart is the event action for the offline installer/uninstaller succeeding 143 const ActOfflineInstallerSuccess = "success" 144 145 // ActOfflineInstallerAbort is the event action for the offline installer being terminated by the user 146 const ActOfflineInstallerAbort = "aborted" 147 148 // CatDebug is the event category used for all debug events 149 const CatDebug = "debug" 150 151 // ActCommandErorr is the event action used for command errors 152 const ActCommandError = "command-error" 153 154 // ActCommandInputError is the event action used for command input errors 155 const ActCommandInputError = "command-input-error" 156 157 // ActExecutorExit is the event action used for executor exit codes 158 const ActExecutorExit = "executor-exit" 159 160 // UpdateLabelSuccess is the sent if an auto-update was successful 161 const UpdateLabelSuccess = "success" 162 163 // UpdateLabelFailed is the sent if an auto-update failed 164 const UpdateLabelFailed = "failure" 165 166 // UpdateLabelTrue is the sent if we should auto-update 167 const UpdateLabelTrue = "true" 168 169 // UpdateLabelForward is the sent if we should not auto-update as we are forwarding a command 170 const UpdateLabelForward = "forward" 171 172 // UpdateLabelUnitTest is the sent if we should not auto-update as we are running unit tests 173 const UpdateLabelUnitTest = "unittest" 174 175 // UpdateLabelConflict is the sent if we should not auto-update as the current command might conflict 176 const UpdateLabelConflict = "conflict" 177 178 // UpdateLabelDisabledEnv is the sent if we should not auto-update as the user has disabled auto-updates via the environment 179 const UpdateLabelDisabledEnv = "disabled-env" 180 181 // UpdateLabelDisabledConfig is the sent if we should not auto-update as the user has disabled auto-updates via the config 182 const UpdateLabelDisabledConfig = "disabled-config" 183 184 // AutoUpdateLabelDisabledCI is the sent if we should not auto-update as we are on CI 185 const UpdateLabelCI = "ci" 186 187 // UpdateLabelFreshInstall is the sent if we should not auto-update as we are on a fresh install 188 const UpdateLabelFreshInstall = "fresh-install" 189 190 // UpdateLabelLocked is the sent if we should not auto-update as the state tool is locked 191 const UpdateLabelLocked = "locked" 192 193 // UpdateLabelTooFreq is the sent if we should not auto-update as the last check was too recent 194 const UpdateLabelTooFreq = "too-frequent" 195 196 // UpdateLabelAvailable is the sent if the update information is available 197 const UpdateLabelAvailable = "available" 198 199 // UpdateLabelUnavailable is the sent if the update information is unavailable 200 const UpdateLabelUnavailable = "unavailable" 201 202 // UpdateErrorInProgress is sent if an update is already in progress 203 const UpdateErrorInProgress = "Update already in progress" 204 205 // UpdateErrorInstallFailed is sent if an update failed at the install step 206 const UpdateErrorInstallFailed = "Could not install update" 207 208 // UpdateErrorExecutable is sent if the state executable could not be located 209 const UpdateErrorExecutable = "Could not locate state executable for relaunch" 210 211 // UpdateErrorRelaunch is sent if the updated state executable could not be relaunched 212 const UpdateErrorRelaunch = "Could not execute relaunch" 213 214 // UpdateErrorNotFound is sent if the update information could not be found 215 const UpdateErrorNotFound = "Update info could not be found" 216 217 // UpdateErrorBlocked is sent if the update information was blocked or the service was unavailable 218 const UpdateErrorBlocked = "Update info request blocked or service unavailable" 219 220 // UpdateErrorFetch is sent if the update information could not be fetched 221 const UpdateErrorFetch = "Could not fetch update info" 222 223 // UpdateErrorTempDir is sent if the temp dir for update unpacking could not be created 224 const UpdateErrorTempDir = "Could not create temp dir" 225 226 // UpdateErrorNoInstaller is sent if the downloaded update does not have an installer 227 const UpdateErrorNoInstaller = "Downloaded update does not have installer" 228 229 // UpdateErrorInstallPath is sent if the install path could not be detected 230 const UpdateErrorInstallPath = "Could not detect install path" 231 232 // CatInteractions is the event category used for tracking user interactions. 233 const CatInteractions = "interactions" 234 235 // ActVcsConflict is the event action sent when `state pull` results in a conflict. 236 const ActVcsConflict = "vcs-conflict" 237 238 // LabelVcsConflictMergeStrategyFailed is the label to use when a merge fails. 239 const LabelVcsConflictMergeStrategyFailed = "Failed"