@@ -11,7 +11,7 @@ import (
1111)
1212
1313var (
14- usdcLatencyBuckets = []float64 {
14+ latencyBuckets = []float64 {
1515 float64 (10 * time .Millisecond ),
1616 float64 (25 * time .Millisecond ),
1717 float64 (50 * time .Millisecond ),
2929 usdcClientHistogram = promauto .NewHistogramVec (prometheus.HistogramOpts {
3030 Name : "ccip_usdc_client_request_total" ,
3131 Help : "Latency of calls to the USDC client" ,
32- Buckets : usdcLatencyBuckets ,
32+ Buckets : latencyBuckets ,
33+ }, []string {"status" , "success" })
34+ lbtcClientHistogram = promauto .NewHistogramVec (prometheus.HistogramOpts {
35+ Name : "ccip_lbtc_client_request_total" ,
36+ Help : "Latency of calls to the LBTC client" ,
37+ Buckets : latencyBuckets ,
3338 }, []string {"status" , "success" })
3439)
3540
@@ -38,11 +43,16 @@ type ObservedIHttpClient struct {
3843 histogram * prometheus.HistogramVec
3944}
4045
41- // NewObservedIHttpClient Create a new ObservedIHttpClient with the USDC client metric.
42- func NewObservedIHttpClient (origin IHttpClient ) * ObservedIHttpClient {
46+ // NewObservedUsdcIHttpClient Create a new ObservedIHttpClient with the USDC client metric.
47+ func NewObservedUsdcIHttpClient (origin IHttpClient ) * ObservedIHttpClient {
4348 return NewObservedIHttpClientWithMetric (origin , usdcClientHistogram )
4449}
4550
51+ // NewObservedLbtcIHttpClient Create a new ObservedIHttpClient with the LBTC client metric.
52+ func NewObservedLbtcIHttpClient (origin IHttpClient ) * ObservedIHttpClient {
53+ return NewObservedIHttpClientWithMetric (origin , lbtcClientHistogram )
54+ }
55+
4656func NewObservedIHttpClientWithMetric (origin IHttpClient , histogram * prometheus.HistogramVec ) * ObservedIHttpClient {
4757 return & ObservedIHttpClient {
4858 IHttpClient : origin ,
0 commit comments