Skip to content

Commit

Permalink
chore(runtime): try to record handler name for eth_call (#1086)
Browse files Browse the repository at this point in the history
  • Loading branch information
rnons authored Dec 20, 2024
1 parent dfd34d6 commit b22eae9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/runtime/src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,13 @@ export class QueuedStaticJsonRpcProvider extends JsonRpcProvider {
let perform = this.#performCache.get(tag)
if (!perform) {
miss_count.add(1)
const handler = metricsStorage.getStore()
const queued: number = Date.now()
perform = this.executor.add(() => {
const started = Date.now()
processMetrics.processor_rpc_queue_duration.record(started - queued, {
chain_id: this._network.chainId.toString(),
handler: metricsStorage.getStore()
handler
})

let success = true
Expand All @@ -142,7 +143,7 @@ export class QueuedStaticJsonRpcProvider extends JsonRpcProvider {
.finally(() => {
processMetrics.processor_rpc_duration.record(Date.now() - started, {
chain_id: this._network.chainId.toString(),
handler: metricsStorage.getStore(),
handler,
success
})
})
Expand Down

0 comments on commit b22eae9

Please sign in to comment.