Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ You will be asked at first-run whether you consent to telemetry being sent to th
* Deprecated package names and versions
* Chrome user-agent (version of Chrome, OS, CPU)
* The number of non-core Atom packages that have been activated
* GitHub username, if a user has authenticated with the GitHub package

This information is sent via [Google Analytics][GA] which allows the Atom team to analyze usage patterns and errors in order to help improve Atom.

Expand Down
3 changes: 2 additions & 1 deletion lib/metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ module.exports = {
sendEvent: Reporter.sendEvent.bind(Reporter),
sendTiming: Reporter.sendTiming.bind(Reporter),
addTiming: Reporter.addTiming.bind(Reporter),
sendException: Reporter.sendException.bind(Reporter)
sendException: Reporter.sendException.bind(Reporter),
setGitHubUser: Reporter.setGitHubUser.bind(Reporter)
}
},

Expand Down
4 changes: 4 additions & 0 deletions lib/reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ class Reporter {
this.send(params)
}

static setGitHubUser (gitHubUser) {
this.getStore().setGitHubUser(gitHubUser)
}

// Private
static getStore () {
if (!store) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"providedServices": {
"metrics-reporter": {
"versions": {
"1.1.0": "provideReporter"
"1.2.0": "provideReporter"
}
}
},
"dependencies": {
"fs-plus": "^3.0.0",
"grim": "^2.0.1",
"node-uuid": "~1.4.7",
"telemetry-github": "0.0.11"
"telemetry-github": "0.0.12"
},
"devDependencies": {
"standard": "*",
Expand Down
9 changes: 9 additions & 0 deletions spec/metrics-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,15 @@ describe('Metrics', () => {
})
)

describe('::setGitHubUser', () =>
it('sets the gitHubUser', () => {
spyOn(store, 'setGitHubUser')
const gitHubUser = 'beyonce'
reporterService.setGitHubUser(gitHubUser)
expect(store.setGitHubUser).toHaveBeenCalledWith(gitHubUser)
})
)

describe('::sendException', () =>
it('makes a request', () => {
reporterService.sendException('desc')
Expand Down