diff --git a/internal/tools/semconvkit/templates/httpconv/http.go.tmpl b/internal/tools/semconvkit/templates/httpconv/http.go.tmpl index 4d9244aa0..f43ad8c1f 100644 --- a/internal/tools/semconvkit/templates/httpconv/http.go.tmpl +++ b/internal/tools/semconvkit/templates/httpconv/http.go.tmpl @@ -68,7 +68,7 @@ var ( // request contained in resp. For example: // // append(ClientResponse(resp), ClientRequest(resp.Request)...) -func ClientResponse(resp http.Response) []attribute.KeyValue { +func ClientResponse(resp *http.Response) []attribute.KeyValue { return hc.ClientResponse(resp) } diff --git a/semconv/internal/v2/http.go b/semconv/internal/v2/http.go index 0f84a905b..c93d768f4 100644 --- a/semconv/internal/v2/http.go +++ b/semconv/internal/v2/http.go @@ -53,7 +53,7 @@ type HTTPConv struct { // request contained in resp. For example: // // append(ClientResponse(resp), ClientRequest(resp.Request)...) -func (c *HTTPConv) ClientResponse(resp http.Response) []attribute.KeyValue { +func (c *HTTPConv) ClientResponse(resp *http.Response) []attribute.KeyValue { var n int if resp.StatusCode > 0 { n++ diff --git a/semconv/internal/v2/http_test.go b/semconv/internal/v2/http_test.go index 73b9aa9b1..5a6686dd7 100644 --- a/semconv/internal/v2/http_test.go +++ b/semconv/internal/v2/http_test.go @@ -47,7 +47,7 @@ var hc = &HTTPConv{ func TestHTTPClientResponse(t *testing.T) { const stat, n = 201, 397 - resp := http.Response{ + resp := &http.Response{ StatusCode: stat, ContentLength: n, } diff --git a/semconv/v1.13.0/httpconv/http.go b/semconv/v1.13.0/httpconv/http.go index 9ba94c9e1..6e5bf4adb 100644 --- a/semconv/v1.13.0/httpconv/http.go +++ b/semconv/v1.13.0/httpconv/http.go @@ -68,7 +68,7 @@ var ( // request contained in resp. For example: // // append(ClientResponse(resp), ClientRequest(resp.Request)...) -func ClientResponse(resp http.Response) []attribute.KeyValue { +func ClientResponse(resp *http.Response) []attribute.KeyValue { return hc.ClientResponse(resp) } diff --git a/semconv/v1.14.0/httpconv/http.go b/semconv/v1.14.0/httpconv/http.go index 57dca5501..1ce725a23 100644 --- a/semconv/v1.14.0/httpconv/http.go +++ b/semconv/v1.14.0/httpconv/http.go @@ -68,7 +68,7 @@ var ( // request contained in resp. For example: // // append(ClientResponse(resp), ClientRequest(resp.Request)...) -func ClientResponse(resp http.Response) []attribute.KeyValue { +func ClientResponse(resp *http.Response) []attribute.KeyValue { return hc.ClientResponse(resp) } diff --git a/semconv/v1.15.0/httpconv/http.go b/semconv/v1.15.0/httpconv/http.go index 1b682db10..3c0d19a70 100644 --- a/semconv/v1.15.0/httpconv/http.go +++ b/semconv/v1.15.0/httpconv/http.go @@ -68,7 +68,7 @@ var ( // request contained in resp. For example: // // append(ClientResponse(resp), ClientRequest(resp.Request)...) -func ClientResponse(resp http.Response) []attribute.KeyValue { +func ClientResponse(resp *http.Response) []attribute.KeyValue { return hc.ClientResponse(resp) } diff --git a/semconv/v1.16.0/httpconv/http.go b/semconv/v1.16.0/httpconv/http.go index 218ac703c..77130fc35 100644 --- a/semconv/v1.16.0/httpconv/http.go +++ b/semconv/v1.16.0/httpconv/http.go @@ -68,7 +68,7 @@ var ( // request contained in resp. For example: // // append(ClientResponse(resp), ClientRequest(resp.Request)...) -func ClientResponse(resp http.Response) []attribute.KeyValue { +func ClientResponse(resp *http.Response) []attribute.KeyValue { return hc.ClientResponse(resp) } diff --git a/semconv/v1.17.0/httpconv/http.go b/semconv/v1.17.0/httpconv/http.go index 7499accfb..f4c6fe6a4 100644 --- a/semconv/v1.17.0/httpconv/http.go +++ b/semconv/v1.17.0/httpconv/http.go @@ -68,7 +68,7 @@ var ( // request contained in resp. For example: // // append(ClientResponse(resp), ClientRequest(resp.Request)...) -func ClientResponse(resp http.Response) []attribute.KeyValue { +func ClientResponse(resp *http.Response) []attribute.KeyValue { return hc.ClientResponse(resp) }