kelp icon indicating copy to clipboard operation
kelp copied to clipboard

Add metrics for trade tracking.

Open debnil opened this issue 5 years ago • 3 comments

This PR adds metrics to track trades. Thus far, it adds a handler interface and implementation. The metrics will be actually added after #508 is merged, because the architecture around adding individual metrics changes.

debnil avatar Nov 03 '20 19:11 debnil

@nikhilsaraf WIP PR for trade metrics. The actual metrics are not added, since we change how metrics are added in the existing PRs, but all the functions to generate those metrics already exist - they just need to be called. Let me know if this handler architecture is what you had in mind when you suggested fillHandler and fillTracker as references.

debnil avatar Nov 03 '20 19:11 debnil

@nikhilsaraf: awesome! I've done the bulk of this review, thanks so much. The only part that's left is the merging trade metrics with map. This only makes sense to do once the GUI metrics tracker is added in, since that changes the architecture of event updates.

debnil avatar Nov 06 '20 00:11 debnil

@nikhilsaraf : most of the requested changes are made, but there's now an import cycle. plugins/tradeMetricsHandler imports models.Trade, which imports plugins indirectly. I don't think there's a way around the handler importing models.Trade, since that's the base data structure for all of its operations. Curious what you think the best fix is.

debnil avatar Nov 20 '20 03:11 debnil