-
-
Notifications
You must be signed in to change notification settings - Fork 76
Add analytics section to the appendix #275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
arafatiqbal
wants to merge
2
commits into
ember-learn:main
Choose a base branch
from
arafatiqbal:132-add-analytics-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
Ember CLI tracks data points related to its use. This information is used by the | ||
Ember and Ember CLI core teams to identify upgrade blockers, monitor build performance, and understand which | ||
features are being used. Users who are uncomfortable with this data collection can permanently disable it by | ||
updating their `.ember-cli` file. | ||
|
||
Ember CLI only tracks the following data points: | ||
|
||
- ember CLI version | ||
- build/rebuild/live-reload times | ||
- how many errors occurred | ||
|
||
**Note:** No personally identifying information is tracked, if something is | ||
being leaked please [disclose responsibly](https://emberjs.com/security) | ||
|
||
This information is used to: | ||
|
||
- See if there are upgrade blockers (users stuck on old version) | ||
- Have a broad idea for build performance (to make sure we don't regress, and how to prioritize) | ||
- See which high-level features are used (serve/test/build/generate etc.) | ||
- See an increase/decrease in error rates | ||
|
||
## Still Not comfortable? | ||
|
||
We understand! To permanently disable any analytics gathering you can update your project's `.ember-cli` file (or `$HOME/.ember-cli` for user-wide): | ||
|
||
```json | ||
{ | ||
"disableAnalytics": true | ||
} | ||
``` | ||
|
||
## Who has access | ||
|
||
The [Ember and Ember CLI core teams](https://emberjs.com/teams/). | ||
These teams have been granted access to the analytics data in order to make informed decisions about the direction | ||
and future of the projects. | ||
|
||
## Links to each code-point where ember-cli emits tracking information | ||
|
||
### Command Name: To understand what high-level features are used | ||
|
||
- [ember-cli/lib/models/command.js](https://github.com/ember-cli/ember-cli/blob/2da9de596370c0e78ea0c0c3ffcd6a551d2863a9/lib/models/command.js#L277) | ||
|
||
```js | ||
this.analytics.track({ | ||
name: 'ember ', | ||
message: this.name, | ||
}); | ||
``` | ||
|
||
### Build Error: The name of the error | ||
|
||
- [ember-cli/lib/models/watcher.js](https://github.com/ember-cli/ember-cli/blob/6ec50a1fd21d961f0b0e2ca4daf66a8e7dea6417/lib/models/watcher.js#L32-L34) | ||
|
||
```js | ||
this.analytics.trackError({ | ||
description: error && error.message, | ||
}); | ||
``` | ||
|
||
### Build/Rebuild Time: Can help identify areas of optimization | ||
|
||
- [ember-cli/lib/tasks/build.js](https://github.com/ember-cli/ember-cli/blob/503ede1fcb5224d54dc36f82af84550a91d90f26/lib/tasks/build.js#L33) | ||
|
||
```js | ||
analytics.track({ | ||
name: 'ember build', | ||
message: `${totalTime}ms`, | ||
}); | ||
``` | ||
|
||
- [ember-cli/lib/tasks/build.js](https://github.com/ember-cli/ember-cli/blob/503ede1fcb5224d54dc36f82af84550a91d90f26/lib/tasks/build.js#L44) | ||
|
||
```js | ||
analytics.trackTiming({ | ||
category: 'rebuild', | ||
variable: 'build time', | ||
label: 'broccoli build time', | ||
value: parseInt(totalTime, 10), | ||
}); | ||
``` | ||
|
||
### Live Reload | ||
|
||
- [ember-cli/lib/tasks/server/livereload-server.js](https://github.com/ember-cli/ember-cli/blob/503ede1fcb5224d54dc36f82af84550a91d90f26/lib/tasks/server/livereload-server.js#L167) | ||
|
||
```js | ||
this.analytics.track({ | ||
name: 'broccoli watcher', | ||
message: 'live-reload', | ||
}); | ||
``` | ||
|
||
- [ember-cli/lib/tasks/server/livereload-server.js](https://github.com/ember-cli/ember-cli/blob/503ede1fcb5224d54dc36f82af84550a91d90f26/lib/tasks/server/livereload-server.js#L181) | ||
|
||
```js | ||
this.analytics.track({ | ||
name: 'express server', | ||
message: 'live-reload', | ||
}); | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.