Skip to content

Commit

Permalink
fix: rpc request duration in seconds (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
renlulu authored Sep 24, 2024
1 parent 4e61a1b commit c26f5df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chainio/clients/eth/instrumented_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ func (iec *InstrumentedClient) TransactionByHash(
if err != nil {
return nil, false, err
}
rpcRequestDuration := time.Since(start)
rpcRequestDuration := time.Since(start).Seconds()
// we only observe the duration of successful calls (even though this is not well defined in the spec)
iec.rpcCallsCollector.ObserveRPCRequestDurationSeconds(
float64(rpcRequestDuration),
Expand Down Expand Up @@ -455,7 +455,7 @@ func instrumentFunction[T any](
if err != nil {
return value, err
}
rpcRequestDuration := time.Since(start)
rpcRequestDuration := time.Since(start).Seconds()
// we only observe the duration of successful calls (even though this is not well defined in the spec)
iec.rpcCallsCollector.ObserveRPCRequestDurationSeconds(
float64(rpcRequestDuration),
Expand Down

0 comments on commit c26f5df

Please sign in to comment.