This repository has been archived by the owner on Aug 12, 2019. It is now read-only.
upgrade to use new method available on metrics-reporter
service
#67
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.
Description of the Change
As part of the
telemetry
project, I added some new interfaces to themetrics
service. For the sake of consistency and not having several apis that serve the same purpose, I'm porting callers of thesendEvent
service to use the newaddCustomEvent
functionality instead.Alternate Designs
I could have left the old interface
sendEvent
interface in place. However, this package looks to be the only caller ofsendEvent
. 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
welcome
package to ensure that:reporterProxy.setReporter
is called, events are sent to the real reporter and queued-up events are flushed.![screen shot 2018-08-20 at 2 14 22 pm](https://user-images.githubusercontent.com/3781742/44367065-7c6d2980-a483-11e8-835a-8a231459cd26.png)
Note: `label` and `value` were undefined before, so these values are consistent with the shape of the event we were previously passing.