Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

send GitHub username with usage metrics #1651

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

annthurium
Copy link

@annthurium annthurium commented Aug 16, 2018

Rationale

In order to plan a good roadmap for Atom's future, we need to have solid info about how users are interacting with Atom.

In the past we have anonymized all usage metrics. Keeping the data anonymized impairs our ability to answer questions like:

  • How does the Atom GitHub package fit in with GitHub.com workflows?
  • How does the Atom GitHub package fit in with workflows in other GitHub tools (such as GitHub Desktop)?
  • Does using Atom allow GitHub users to be more productive?

These questions are important. Therefore, we are introducing a change to pass the GitHub username with our usage metrics, if the user has authenticated with the GitHub package.

You do not have to authenticate with GitHub to use Atom, or the GitHub package. Some functionality does require authenticating, though.

If users don't want their GitHub username to be included in usability metrics, they can opt-out of sending their usage stats to GitHub. Or they can choose not to authenticate.

Approach

Use graphQL to fetch the GitHub username and send it to the metrics package. The metrics package exposes a service to do so in atom/metrics#97 which must be merged before this pull request. The ObserveModel decorator wraps the login component so that we can re-fetch the data anytime the user performs a new login action.

Alternate Approaches

We could send the authentication token to the metrics back end and do the username lookup there. However, anytime you're sending tokens around, that's a security risk. Also, the approach I chose is more

Test Plan

  • Via console logging, verify that username is fetched from graphql.
  • Unit tests to:
    • validate that ReporterProxy sends the username to metrics
    • getGitHubUser handles graphql errors gracefully
    • getGitHubUser extracts the username from the response
    • Data is re-fected in the GitHubPackage when user re-authenticates.

@Aerijo
Copy link
Contributor

Aerijo commented Aug 16, 2018

If users don't want their GitHub username to be included in usability metrics, they can opt-out

Personally, I think identifiable metrics need to be opt-in if you want to keep trust in the metrics package (and by extension Atom itself). I imagine people won't be happy if they discover it switched to sending non-anonymous data without their explicit acceptance.

@coveralls
Copy link

coveralls commented Aug 16, 2018

Coverage Status

Coverage increased (+0.05%) to 80.244% when pulling f6df23c on tt-18-aug-username into d295090 on master.

@annthurium
Copy link
Author

@Aerijo Since this is a sensitive topic, we're going to discuss this at a maintainer's meeting sometime in the next couple of weeks. We'll let you know in advance that this in on the agenda. Looking forward to hearing your perspective there.

@annthurium
Copy link
Author

heads up - we will be discussing this at the maintainers' meeting tomorrow. If you have thoughts, please come weigh in.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants