Skip to content

Commit

Permalink
improvement(analytics): improve the data collection (#1438)
Browse files Browse the repository at this point in the history
* improvement(analytics): improve the data collection

These changes bring some improvement what kind of data we track,
how we track these events and the opt-in mechanism.

Major changes:

- Change analytics from optional to automatic opt-in
- Add batchId to Task events
- Rename taskName to taskType and added taskStatus
- Add sessionId to events
- Change projectId from uuid to hash of git origin
- Turn on analytics for CI
- Add project configuration aggregates
  • Loading branch information
10ko authored and edvald committed Dec 19, 2019
1 parent 4fa85dc commit 04ffbbe
Show file tree
Hide file tree
Showing 29 changed files with 495 additions and 282 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ Garden, as a company, is also a proud member of the [CNCF](https://www.cncf.io/)

## Analytics

When running Garden for the first time, we'll ask you to opt in to our analytics. We are trying to make Garden the best tool possible, and it's very useful for us to inform the future development of Garden with data on how it's being used.
We are trying to make Garden the best tool possible, and it's very useful for us to inform the future development of Garden with data on how it's being used.

When you opt-in we will collect information about the commands you run, the tasks getting executed, the project and operating system. We care about your privacy and we take special care to anonymize all the information. For example, we hash module names, and use randomly generated IDs to identify projects.
When you use Garden we collect information about the commands you run, the tasks getting executed, the project and operating system. We care about your privacy and we take special care to anonymize all the information. For example, we hash module names, and use randomly generated IDs to identify projects.

If you change your mind and would like to update your analytics settings, please run (from within a project):
If you would like to update your analytics settings, please run (from within a project):

```sh
garden config analytics-enabled true|false
Expand Down
2 changes: 1 addition & 1 deletion garden-service/src/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import normalizePath = require("normalize-path")

import { PublishModuleParams, PublishResult } from "./types/plugin/module/publishModule"
import { SetSecretParams, SetSecretResult } from "./types/plugin/provider/setSecret"
import { validate } from "./config/common"
import { validate } from "./config/validation"
import { defaultProvider } from "./config/provider"
import { ParameterError, PluginError, ConfigurationError, InternalError, RuntimeError } from "./exceptions"
import { Garden } from "./garden"
Expand Down
16 changes: 16 additions & 0 deletions garden-service/src/analytics/analytics-types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (C) 2018 Garden Technologies, Inc. <[email protected]>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

export enum AnalyticsType {
COMMAND = "Run Command",
TASK = "Run Task",
CALL_API = "Call API",
MODULE_CONFIG_ERROR = "Module Configuration Error",
PROJECT_CONFIG_ERROR = "Project Configuration Error",
VALIDATION_ERROR = "Validation Error",
}
Loading

0 comments on commit 04ffbbe

Please sign in to comment.