1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-23 22:34:47 +02:00

Change ClientResponse to accept an *http.Response (#3617)

This commit is contained in:
Tyler Yahn
2023-01-26 09:21:55 -08:00
committed by GitHub
parent c0fb8dec4c
commit 604772dda3
8 changed files with 8 additions and 8 deletions

View File

@@ -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)
}

View File

@@ -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++

View File

@@ -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,
}

View File

@@ -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)
}

View File

@@ -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)
}

View File

@@ -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)
}

View File

@@ -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)
}

View File

@@ -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)
}