Skip to content
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

feat: Log QuoteReport to Kibana #298

Merged
merged 24 commits into from
Aug 10, 2020
Merged

Conversation

steveklebanoff
Copy link
Contributor

@steveklebanoff steveklebanoff commented Jul 27, 2020

Logs QuoteReports for RFQT firm quotes so that they can be consumed by Kibana and later put into metabase.

When a firm quote is to be submitted by the taker, it is logged with a uniqueIdString to be associated with the random number + timestamp when the fill occurs on chain (See #281)

This does not work for meta txns, because the additional calldata is generated as the time that the meta txn service submits the fill on-chain, which is a different request than when the 'order salad' was created. In that case, we log the zeroExTransactionHash so we can associate it in metabase.

Also, we log the sources in "chunks", as outputting the entire object was too big to be parsed

TODO

  • Try on staging
  • Update to latest version of asset-swapper
  • Understand if inconsistencies on staging v1 price and quote are due to this
  • Consider adding additional metadata (i.e. api key or affiliate address)
  • Consider putting back apiKey check prior to logging back for meta_txn

Description

Testing Instructions

Checklist

  • Update documentation as needed. Website Documentation PR:
  • Prefix PR title with [WIP] if necessary.
  • Add tests to cover changes as needed.

package.json Outdated Show resolved Hide resolved
@steveklebanoff steveklebanoff changed the title [WIP] Log QuoteReport to Kibana feat: Log QuoteReport to Kibana Jul 27, 2020
This reverts commit ddd8e9a.
@steveklebanoff
Copy link
Contributor Author

deploy staging

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@steveklebanoff
Copy link
Contributor Author

deploy staging

@@ -206,6 +216,11 @@ export class MetaTransactionService {
)
.callAsync();

// log quote report and associate with txn hash if this is an RFQT firm quote
Copy link
Contributor

@alexkroeger alexkroeger Aug 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean we don't get a report if the meta TX didn't consider an RFQT quote?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right now all meta-txn calls are RFQT enabled b/c they all come from matcha.

for non-meta-txn calls I do limit it only to RFQT firm quotes (

if (quote.quoteReport && params.rfqt && params.rfqt.intentOnFilling) {
) since there will be a lot of verbose log lines emitted.

if we find this data useful for firm quotes we can consider opening up to all requests (as long as get confirmation from Oskar that our log serve can handle it)

src/services/meta_transaction_service.ts Show resolved Hide resolved
src/types.ts Outdated Show resolved Hide resolved
src/types.ts Outdated Show resolved Hide resolved
src/utils/quote_report_utils.ts Outdated Show resolved Hide resolved
src/utils/quote_report_utils.ts Outdated Show resolved Hide resolved
src/utils/service_utils.ts Show resolved Hide resolved
@steveklebanoff
Copy link
Contributor Author

deploy staging

@steveklebanoff
Copy link
Contributor Author

deploy staging

@steveklebanoff steveklebanoff merged commit 7bd6d4d into master Aug 10, 2020
@steveklebanoff steveklebanoff deleted the quote-report-reported branch August 10, 2020 19:44
github-actions bot pushed a commit that referenced this pull request Aug 17, 2020
# [1.15.0](v1.14.0...v1.15.0) (2020-08-17)

### Bug Fixes

* added new asset swapper ([#316](#316)) ([029a58a](029a58a))
* excluded sources test ([#322](#322)) ([1327261](1327261))
* lower db pool connections ([#318](#318)) ([d9cb04d](d9cb04d))
* lower db pool connections ([#319](#319)) ([bc9f218](bc9f218))

### Features

* Log QuoteReport to Kibana ([#298](#298)) ([7bd6d4d](7bd6d4d))
@github-actions
Copy link

🎉 This PR is included in version 1.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants