diff --git a/src/routers/alpha-router/quoters/mixed-quoter.ts b/src/routers/alpha-router/quoters/mixed-quoter.ts index 9fae31912..ec0ee9f50 100644 --- a/src/routers/alpha-router/quoters/mixed-quoter.ts +++ b/src/routers/alpha-router/quoters/mixed-quoter.ts @@ -241,6 +241,11 @@ export class MixedQuoter extends BaseQuoter< MetricLoggerUnit.Milliseconds ); + metric.putMetric( + `MixedQuotesLoad_Chain_${this.chainId}`, + Date.now() - beforeQuotes + ); + metric.putMetric( 'MixedQuotesFetched', _(routesWithQuotes) @@ -249,6 +254,20 @@ export class MixedQuoter extends BaseQuoter< MetricLoggerUnit.Count ); + metric.putMetric( + `MixedQuotesFetched_Chain_${this.chainId}`, + _(routesWithQuotes) + .map(([, quotes]) => quotes.length) + .sum() + ); + + metric.putMetric(`MixedRoutesFetched`, _(routesWithQuotes).sum()); + + metric.putMetric( + `MixedRoutesFetched_Chain_${this.chainId}`, + _(routesWithQuotes).sum() + ); + const routesWithValidQuotes = []; for (const routeWithQuote of routesWithQuotes) { diff --git a/src/routers/alpha-router/quoters/v2-quoter.ts b/src/routers/alpha-router/quoters/v2-quoter.ts index bb94053fb..5efec581d 100644 --- a/src/routers/alpha-router/quoters/v2-quoter.ts +++ b/src/routers/alpha-router/quoters/v2-quoter.ts @@ -205,6 +205,11 @@ export class V2Quoter extends BaseQuoter { MetricLoggerUnit.Milliseconds ); + metric.putMetric( + `V2QuotesLoad_Chain_${this.chainId}`, + Date.now() - beforeQuotes + ); + metric.putMetric( 'V2QuotesFetched', _(routesWithQuotes) @@ -213,6 +218,20 @@ export class V2Quoter extends BaseQuoter { MetricLoggerUnit.Count ); + metric.putMetric( + `V2QuotesFetched_Chain_${this.chainId}`, + _(routesWithQuotes) + .map(([, quotes]) => quotes.length) + .sum() + ); + + metric.putMetric(`V2RoutesFetched`, _(routesWithQuotes).sum()); + + metric.putMetric( + `V2RoutesFetched_Chain_${this.chainId}`, + _(routesWithQuotes).sum() + ); + const routesWithValidQuotes = []; for (const routeWithQuote of routesWithQuotes) { diff --git a/src/routers/alpha-router/quoters/v3-quoter.ts b/src/routers/alpha-router/quoters/v3-quoter.ts index 691044be6..1d636234e 100644 --- a/src/routers/alpha-router/quoters/v3-quoter.ts +++ b/src/routers/alpha-router/quoters/v3-quoter.ts @@ -174,6 +174,11 @@ export class V3Quoter extends BaseQuoter { MetricLoggerUnit.Milliseconds ); + metric.putMetric( + `V3QuotesLoad_Chain_${this.chainId}`, + Date.now() - beforeQuotes + ); + metric.putMetric( 'V3QuotesFetched', _(routesWithQuotes) @@ -182,6 +187,20 @@ export class V3Quoter extends BaseQuoter { MetricLoggerUnit.Count ); + metric.putMetric( + `V3QuotesFetched_Chain_${this.chainId}`, + _(routesWithQuotes) + .map(([, quotes]) => quotes.length) + .sum() + ); + + metric.putMetric(`V3RoutesFetched`, _(routesWithQuotes).sum()); + + metric.putMetric( + `V3RoutesFetched_Chain_${this.chainId}`, + _(routesWithQuotes).sum() + ); + const routesWithValidQuotes = []; for (const routeWithQuote of routesWithQuotes) { diff --git a/src/routers/alpha-router/quoters/v4-quoter.ts b/src/routers/alpha-router/quoters/v4-quoter.ts index 71d1bea50..b3f09ca81 100644 --- a/src/routers/alpha-router/quoters/v4-quoter.ts +++ b/src/routers/alpha-router/quoters/v4-quoter.ts @@ -173,6 +173,11 @@ export class V4Quoter extends BaseQuoter { MetricLoggerUnit.Milliseconds ); + metric.putMetric( + `V4QuotesLoad_Chain_${this.chainId}`, + Date.now() - beforeQuotes + ); + metric.putMetric( 'V4QuotesFetched', _(routesWithQuotes) @@ -181,6 +186,20 @@ export class V4Quoter extends BaseQuoter { MetricLoggerUnit.Count ); + metric.putMetric( + `V4QuotesFetched_Chain_${this.chainId}`, + _(routesWithQuotes) + .map(([, quotes]) => quotes.length) + .sum() + ); + + metric.putMetric(`V4RoutesFetched`, _(routesWithQuotes).sum()); + + metric.putMetric( + `V4RoutesFetched_Chain_${this.chainId}`, + _(routesWithQuotes).sum() + ); + const routesWithValidQuotes = []; for (const routeWithQuote of routesWithQuotes) {