diff --git a/fxhttpclient/go.mod b/fxhttpclient/go.mod index 64bbaa90..fa8887af 100644 --- a/fxhttpclient/go.mod +++ b/fxhttpclient/go.mod @@ -8,7 +8,7 @@ require ( github.com/ankorstore/yokai/fxlog v1.1.0 github.com/ankorstore/yokai/fxmetrics v1.1.0 github.com/ankorstore/yokai/fxtrace v1.2.0 - github.com/ankorstore/yokai/httpclient v1.3.1 + github.com/ankorstore/yokai/httpclient v1.4.0 github.com/ankorstore/yokai/log v1.2.0 github.com/ankorstore/yokai/trace v1.2.0 github.com/prometheus/client_golang v1.19.0 diff --git a/fxhttpclient/go.sum b/fxhttpclient/go.sum index aec7335a..f80e1cd4 100644 --- a/fxhttpclient/go.sum +++ b/fxhttpclient/go.sum @@ -8,8 +8,8 @@ github.com/ankorstore/yokai/fxmetrics v1.1.0 h1:S0bLCwO37oiDG+5kQFGYt2g2FNGQLu/O github.com/ankorstore/yokai/fxmetrics v1.1.0/go.mod h1:WBr76IIdlSZIpBsjKSdXCAJBWF0HCp46bwFX8bt0tFk= github.com/ankorstore/yokai/fxtrace v1.2.0 h1:SXlWbjKSsb2wVH+hXSE9OD2VwyqkznwwW+kiQcNvEAU= github.com/ankorstore/yokai/fxtrace v1.2.0/go.mod h1:ch72eVTlIedETOApK7SXk2NEWpn3yYeM018dNRccocg= -github.com/ankorstore/yokai/httpclient v1.3.1 h1:wvhHKCgNIkGodgi+Pl+n97034YoD8rwvYsDJsXV4KP0= -github.com/ankorstore/yokai/httpclient v1.3.1/go.mod h1:sBg8v79VgHtShuGUTo+BwWqvim7Ubd9eoWMJqK3MCwg= +github.com/ankorstore/yokai/httpclient v1.4.0 h1:m3pMhY62wj96J/k7C4Dv0a2eIQZyLa2O337DRNzTpvw= +github.com/ankorstore/yokai/httpclient v1.4.0/go.mod h1:sBg8v79VgHtShuGUTo+BwWqvim7Ubd9eoWMJqK3MCwg= github.com/ankorstore/yokai/log v1.2.0 h1:jiuDiC0dtqIGIOsFQslUHYoFJ1qjI+rOMa6dI1LBf2Y= github.com/ankorstore/yokai/log v1.2.0/go.mod h1:MVvUcms1AYGo0BT6l88B9KJdvtK6/qGKdgyKVXfbmyc= github.com/ankorstore/yokai/trace v1.2.0 h1:Jnl++IGNpDYumsZJXP3qjhMdvyHbejiajQwIlU604w0= diff --git a/fxhttpclient/module_test.go b/fxhttpclient/module_test.go index b70986e9..8b998bca 100644 --- a/fxhttpclient/module_test.go +++ b/fxhttpclient/module_test.go @@ -101,9 +101,9 @@ func TestModule(t *testing.T) { expectedMetric := fmt.Sprintf( ` - # HELP foo_bar_httpclient_requests_total Number of performed HTTP requests - # TYPE foo_bar_httpclient_requests_total counter - foo_bar_httpclient_requests_total{host="%s",method="POST",path="",status="2xx"} 1 + # HELP foo_bar_http_client_requests_total Number of performed HTTP requests + # TYPE foo_bar_http_client_requests_total counter + foo_bar_http_client_requests_total{host="%s",method="POST",path="",status="2xx"} 1 `, httpServer.URL, ) @@ -111,7 +111,7 @@ func TestModule(t *testing.T) { err = testutil.GatherAndCompare( metricsRegistry, strings.NewReader(expectedMetric), - "foo_bar_httpclient_requests_total", + "foo_bar_http_client_requests_total", ) assert.NoError(t, err) @@ -158,10 +158,10 @@ func TestModule(t *testing.T) { expectedMetric = fmt.Sprintf( ` - # HELP foo_bar_httpclient_requests_total Number of performed HTTP requests - # TYPE foo_bar_httpclient_requests_total counter - foo_bar_httpclient_requests_total{host="%s",method="POST",path="",status="2xx"} 1 - foo_bar_httpclient_requests_total{host="%s",method="POST",path="",status="4xx"} 1 + # HELP foo_bar_http_client_requests_total Number of performed HTTP requests + # TYPE foo_bar_http_client_requests_total counter + foo_bar_http_client_requests_total{host="%s",method="POST",path="",status="2xx"} 1 + foo_bar_http_client_requests_total{host="%s",method="POST",path="",status="4xx"} 1 `, httpServer.URL, httpServer.URL, @@ -170,7 +170,7 @@ func TestModule(t *testing.T) { err = testutil.GatherAndCompare( metricsRegistry, strings.NewReader(expectedMetric), - "foo_bar_httpclient_requests_total", + "foo_bar_http_client_requests_total", ) assert.NoError(t, err) @@ -217,11 +217,11 @@ func TestModule(t *testing.T) { expectedMetric = fmt.Sprintf( ` - # HELP foo_bar_httpclient_requests_total Number of performed HTTP requests - # TYPE foo_bar_httpclient_requests_total counter - foo_bar_httpclient_requests_total{host="%s",method="POST",path="",status="2xx"} 1 - foo_bar_httpclient_requests_total{host="%s",method="POST",path="",status="4xx"} 1 - foo_bar_httpclient_requests_total{host="%s",method="POST",path="",status="5xx"} 1 + # HELP foo_bar_http_client_requests_total Number of performed HTTP requests + # TYPE foo_bar_http_client_requests_total counter + foo_bar_http_client_requests_total{host="%s",method="POST",path="",status="2xx"} 1 + foo_bar_http_client_requests_total{host="%s",method="POST",path="",status="4xx"} 1 + foo_bar_http_client_requests_total{host="%s",method="POST",path="",status="5xx"} 1 `, httpServer.URL, httpServer.URL, @@ -231,7 +231,7 @@ func TestModule(t *testing.T) { err = testutil.GatherAndCompare( metricsRegistry, strings.NewReader(expectedMetric), - "foo_bar_httpclient_requests_total", + "foo_bar_http_client_requests_total", ) assert.NoError(t, err) @@ -279,12 +279,12 @@ func TestModule(t *testing.T) { expectedMetric = fmt.Sprintf( ` - # HELP foo_bar_httpclient_requests_total Number of performed HTTP requests - # TYPE foo_bar_httpclient_requests_total counter - foo_bar_httpclient_requests_total{host="%s",method="POST",path="",status="2xx"} 1 - foo_bar_httpclient_requests_total{host="%s",method="GET",path="%s",status="3xx"} 1 - foo_bar_httpclient_requests_total{host="%s",method="POST",path="",status="4xx"} 1 - foo_bar_httpclient_requests_total{host="%s",method="POST",path="",status="5xx"} 1 + # HELP foo_bar_http_client_requests_total Number of performed HTTP requests + # TYPE foo_bar_http_client_requests_total counter + foo_bar_http_client_requests_total{host="%s",method="POST",path="",status="2xx"} 1 + foo_bar_http_client_requests_total{host="%s",method="GET",path="%s",status="3xx"} 1 + foo_bar_http_client_requests_total{host="%s",method="POST",path="",status="4xx"} 1 + foo_bar_http_client_requests_total{host="%s",method="POST",path="",status="5xx"} 1 `, httpServer.URL, httpServer.URL, @@ -296,7 +296,7 @@ func TestModule(t *testing.T) { err = testutil.GatherAndCompare( metricsRegistry, strings.NewReader(expectedMetric), - "foo_bar_httpclient_requests_total", + "foo_bar_http_client_requests_total", ) assert.NoError(t, err) }