VRF v2: more prom metrics - #6902
Conversation
|
I see that you haven't updated any CHANGELOG files. Would it make sense to do so? |
This comment has been minimized.
This comment has been minimized.
| Buckets: []float64{ | ||
| float64(500 * time.Millisecond), | ||
| float64(time.Second), | ||
| float64(5 * time.Second), | ||
| float64(15 * time.Second), | ||
| float64(30 * time.Second), | ||
| float64(time.Minute), | ||
| float64(2 * time.Minute), |
There was a problem hiding this comment.
Bucket values here are up for discussion, I wasn't sure what kind of values we'd see.
There was a problem hiding this comment.
Is there an example of another histogram and what the values are there? This is my first time seeing something like this.
There was a problem hiding this comment.
Another example is here: https://github.com/smartcontractkit/chainlink/blob/develop/core/chains/evm/client/node.go#L65-L78 you can read more about prometheus histograms here: https://prometheus.io/docs/practices/histograms/
| Buckets: []float64{ | ||
| float64(500 * time.Millisecond), | ||
| float64(time.Second), | ||
| float64(5 * time.Second), | ||
| float64(15 * time.Second), | ||
| float64(30 * time.Second), | ||
| float64(time.Minute), | ||
| float64(2 * time.Minute), | ||
| float64(5 * time.Minute), | ||
| float64(10 * time.Minute), | ||
| }, |
There was a problem hiding this comment.
These buckets are up for debate as well.
| // MinKey returns the minimum value of the given element array with respect | ||
| // to the given key function. In the event U is not a compound type (e.g a | ||
| // struct) an identity function can be provided. | ||
| func MinKey[U any, T constraints.Ordered](elems []U, key func(U) T) T { |
There was a problem hiding this comment.
Sidenote: methods like this would be very useful to have in a general utility library (honestly, most of the functions in the utils package can probably be safely extracted)
| // Since we can re-enter this method by way of tryAgainBumpingGas, | ||
| // and we pass the same initialBroadcastAt timestamp there, when we re-enter | ||
| // this function we'll be using the same initialBroadcastAt. | ||
| observeTimeUntilBroadcast(eb.chainID, etx.CreatedAt, time.Now()) |
There was a problem hiding this comment.
at this point the tx has been sent and is in the mempool correct? We are not assuming that at this point there have been any confirmations etc..
There was a problem hiding this comment.
Nvm I see below we do confirmations.
There was a problem hiding this comment.
Yep this is just for broadcasting, not for confirming.
1. vrf_request_time_between_sims: this will record the duration in between two simulation attempts of the same request. 2. vrf_request_time_until_initial_sim: this will record the duration until a request is first simulated after it's been received.
This PR adds the following prometheus metrics:
eth_broadcaster.go)eth_confirmer.go)