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

upgrade to use new method available on `metrics-reporter` service #67

Merged
merged 2 commits into from Aug 20, 2018

Conversation

Projects
None yet
2 participants
@annthurium
Contributor

annthurium commented Aug 20, 2018

Description of the Change

As part of the telemetry project, I added some new interfaces to the metrics service. For the sake of consistency and not having several apis that serve the same purpose, I'm porting callers of the sendEvent service to use the new addCustomEvent functionality instead.

Alternate Designs

I could have left the old interface sendEvent interface in place. However, this package looks to be the only caller of sendEvent. It feels lazy not to clean that up and completely deprecated the old interface.

Why Should This Be In Core?

The new user experience is already in the core of Atom. This pull request adds no new user-visible functionality to Atom. It's pure refactoring / cleanup.

Benefits

After this change is merged, there are no callers of metricsProvider.sendEvent which means that api can safely be removed in future versions of Atom. Having a smaller api surface area for Atom to support increases maintainability of Atom in the future.

Possible Drawbacks

Any change introduces the possibility of regressions or uncaught bugs. Other than that, I couldn't think of any drawbacks. If you think of any, I am super open to hearing them.

Test Plan

  • Update unit tests of welcome package to ensure that:
    • when reporterProxy.setReporter is called, events are sent to the real reporter and queued-up events are flushed.
  • Manual testing: in a dev mode window, configure atom to show welcome on startup. Add console logging to ensure that welcome events are sent to the reporter, and that these events have the shape that we expect.

screen shot 2018-08-20 at 2 14 22 pm

Note: `label` and `value` were undefined before, so these values are consistent with the shape of the event we were previously passing.
@daviwil

Looks great!

@annthurium annthurium merged commit 55ecc3b into master Aug 20, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@annthurium annthurium deleted the tt-18-aug-cleanup-reporter branch Aug 20, 2018

@annthurium

This comment has been minimized.

Show comment
Hide comment
@annthurium

annthurium Aug 20, 2018

Contributor

I think this is good to go, so I'm gonna go ahead and merge. If you have questions or concerns about this PR, please do leave a comment and I will follow up with you.

Contributor

annthurium commented Aug 20, 2018

I think this is good to go, so I'm gonna go ahead and merge. If you have questions or concerns about this PR, please do leave a comment and I will follow up with you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment