-
Notifications
You must be signed in to change notification settings - Fork 760
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add prometheus to client and begin implementing custom metrics (#3287)
* Add prometheus and txGuage for tx pool transaction count * Use import instead of require * Add cli option for enabling prometheus server * Fix test * Include typings for prometheus parameters * Update test timeouts * Update package files * Remove unneeded dep * Update packages/client/src/service/txpool.ts Co-authored-by: acolytec3 <[email protected]> * Update packages/client/src/service/txpool.ts Co-authored-by: acolytec3 <[email protected]> * Update packages/client/src/service/txpool.ts Co-authored-by: acolytec3 <[email protected]> * Track transaction in pool count by transaction type * Add test to verify tx count is incremented with prometheus gauge after transaction is added to pool * nits * Add prometheus port * Overhaul placement and management of metrics server * Fix typing * Generalize port number in comment --------- Co-authored-by: acolytec3 <[email protected]>
- Loading branch information
Showing
14 changed files
with
5,058 additions
and
6,324 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import * as promClient from 'prom-client' | ||
|
||
export const setupMetrics = () => { | ||
return { | ||
legacyTxGauge: new promClient.Gauge({ | ||
name: 'legacy_transactions_in_transaction_pool', | ||
help: 'Number of legacy transactions in the client transaction pool', | ||
}), | ||
accessListEIP2930TxGauge: new promClient.Gauge({ | ||
name: 'access_list_eip2930_transactions_in_transaction_pool', | ||
help: 'Number of access list EIP 2930 transactions in the client transaction pool', | ||
}), | ||
feeMarketEIP1559TxGauge: new promClient.Gauge({ | ||
name: 'fee_market_eip1559_transactions_in_transaction_pool', | ||
help: 'Number of fee market EIP 1559 transactions in the client transaction pool', | ||
}), | ||
blobEIP4844TxGauge: new promClient.Gauge({ | ||
name: 'blob_eip_4844_transactions_in_transaction_pool', | ||
help: 'Number of blob EIP 4844 transactions in the client transaction pool', | ||
}), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,5 +107,5 @@ describe( | |
assert.ok(res.error.message.includes('"pending" is not yet supported')) | ||
}) | ||
}, | ||
30000 | ||
40000 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.