Skip to content

Commit

Permalink
[chore] use context when making a http request (#24928)
Browse files Browse the repository at this point in the history
No context object is available in dimclient, so passing
context.Background() for now.
  • Loading branch information
atoulme authored Aug 7, 2023
1 parent be6eac8 commit f60c806
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion exporter/signalfxexporter/internal/dimensions/dimclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ func (dc *DimensionClient) makePatchRequest(dim *DimensionUpdate) (*http.Request
return nil, err
}

req, err := http.NewRequest(
req, err := http.NewRequestWithContext(
context.Background(),
"PATCH",
strings.TrimRight(url.String(), "/")+"/_/sfxagent",
bytes.NewReader(json))
Expand Down

0 comments on commit f60c806

Please sign in to comment.