[Blockchain Watcher] (FIX - ALGORAND) Mapped grafana config to source events (#1507)

Mapped grafana config to source events

Co-authored-by: julian merlo <julianmerlo@julians-MacBook-Pro-2.local>
This commit is contained in:
Julian 2024-06-26 09:50:43 -03:00 committed by GitHub
parent 6f7d457386
commit 7bdc71cd62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 5 deletions

View File

@ -27,23 +27,27 @@ export class HandleAlgorandTransactions {
}
private report(protocol: string) {
const labels = {
if (!this.cfg.metricName) return;
const labels = this.cfg.metricLabels ?? {
job: this.cfg.id,
chain: "algorand",
protocol: protocol ?? "unknown",
protocol: protocol,
commitment: "latest",
};
this.statsRepo.count(this.cfg.metricName, labels);
}
}
export interface HandleAlgorandTransactionsOptions {
metricLabels?: { job: string; chain: string; commitment: string };
metricName: string;
filter: Filter[];
id: string;
}
type Filter = {
applicationIds: string;
applicationAddress: string;
applicationIds: string;
};

View File

@ -132,7 +132,12 @@ data:
"applicationIds": "86525623",
"applicationAddress": "C2SZBD4ZFFDXANBCUTG5GBUEWMQ34JS5LFGDRTEVJBAXDRF6ZWB7Q4KHHM"
}
]
],
"metricLabels": {
"job": "poll-log-message-published-algorand",
"chain": "algorand",
"commitment": "latest"
}
}
}
]
@ -241,7 +246,12 @@ data:
"applicationIds": "842125965",
"applicationAddress": "J476J725L4JTOI2YU6DAI4E23LYUECLZR7RCYZ3LK6QFHX4M54ZI53SGXQ"
}
]
],
"metricLabels": {
"job": "poll-log-message-published-algorand",
"chain": "algorand",
"commitment": "latest"
}
}
}
]