Skip to content

Commit

Permalink
fix(dashboard): attempt to fix testnets widgets with errors (#1024)
Browse files Browse the repository at this point in the history
  • Loading branch information
xrsv authored Feb 21, 2025
1 parent d9a84d6 commit 0cb4a94
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions bin/stacks/routing-dashboard-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,18 @@ export class RoutingDashboardStack extends cdk.NestedStack {
type: 'metric',
properties: {
metrics: chains.map((chainId) => [
NAMESPACE,
`GET_QUOTE_REQUESTED_CHAINID: ${chainId}`,
'Service',
'RoutingAPI',
{ id: `mreqc${chainId}`, label: `Requests on ${ID_TO_NETWORK_NAME(chainId)}` },
{
expression: `FILL(mreqc${chainId}, 0)`,
label: `Requests on ${ID_TO_NETWORK_NAME(chainId)}`,
id: `e1c${chainId}`,
},
[
NAMESPACE,
`GET_QUOTE_REQUESTED_CHAINID: ${chainId}`,
'Service',
'RoutingAPI',
{ id: `mreqc${chainId}`, visible: false },
],
]),
view: 'timeSeries',
stacked: false,
Expand Down Expand Up @@ -399,7 +406,8 @@ export class RoutingDashboardStack extends cdk.NestedStack {
metrics: _.flatMap(chains, (chainId) => [
[
{
expression: `(m200c${chainId} / (mreqc${chainId} - m400c${chainId})) * 100`,
expression: `IF(FILL(mreqc${chainId}, 0) == 0, 0,
(m200c${chainId} / (mreqc${chainId} - m400c${chainId})) * 100)`,
label: `Success Rate on ${ID_TO_NETWORK_NAME(chainId)}`,
id: `e1c${chainId}`,
},
Expand Down Expand Up @@ -449,7 +457,8 @@ export class RoutingDashboardStack extends cdk.NestedStack {
metrics: _.flatMap(chains, (chainId) => [
[
{
expression: `(m200c${chainId} / mreqc${chainId}) * 100`,
expression: `IF(FILL(mreqc${chainId}, 0) == 0, 0,
(m200c${chainId} / mreqc${chainId}) * 100)`,
label: `Success Rate (w. 4XX) on ${ID_TO_NETWORK_NAME(chainId)}`,
id: `e1c${chainId}`,
},
Expand Down Expand Up @@ -492,7 +501,8 @@ export class RoutingDashboardStack extends cdk.NestedStack {
metrics: _.flatMap(chains, (chainId) => [
[
{
expression: `(m500c${chainId} / mreqc${chainId}) * 100`,
expression: `IF(FILL(mreqc${chainId}, 0) == 0, 0,
(m500c${chainId} / mreqc${chainId}) * 100)`,
label: `5XX Error Rate on ${ID_TO_NETWORK_NAME(chainId)}`,
id: `e1c${chainId}`,
},
Expand Down Expand Up @@ -535,7 +545,8 @@ export class RoutingDashboardStack extends cdk.NestedStack {
metrics: _.flatMap(chains, (chainId) => [
[
{
expression: `(m400c${chainId} / mreqc${chainId}) * 100`,
expression: `IF(FILL(mreqc${chainId}, 0) == 0, 0,
(m400c${chainId} / mreqc${chainId}) * 100)`,
label: `4XX Error Rate on ${ID_TO_NETWORK_NAME(chainId)}`,
id: `e2c${chainId}`,
},
Expand Down

0 comments on commit 0cb4a94

Please sign in to comment.