-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Feature] Added Prometheus metrics to blockchain-api #115
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for being annoying with the two small style issues :(
Love that we're getting metrics! It will really help us make better decisions to have this info 😄
Also, looks like the yarn.lock
needs updating :)
@@ -58,6 +61,8 @@ export class BlockscoutAPI extends RESTDataSource { | |||
async getRawTokenTransactions(address: string): Promise<Transaction[]> { | |||
console.info(`Getting token transactions for address: ${address}`) | |||
|
|||
// Measure time at beginning of execution | |||
const t0 = performance.now() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this timing measurement could be implemented as a decorator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I felt doing it this way was a little more granular given I didn't understand the structure of the code I was instrumenting as much. I think that would be a good refactor at least.
561ece9
to
ce920e8
Compare
0383d7c
to
f3436aa
Compare
f3436aa
to
f10dabd
Compare
…nto blockchain-api-metrics * 'blockchain-api-metrics' of github.com:celo-org/wallet: Updated yarn.lock
de4c950
to
cf2a899
Compare
* added prometheus metrics Co-authored-by: Valentin Rodygin <valentin@clabs.co>
Changes:
express-prom-bundle
for prometheus metrics, exposes them at/metrics