Skip to content

Commit

Permalink
use trace context in outgoing http request (#176)
Browse files Browse the repository at this point in the history
* use trace context in outgoing http request

* Add release notes
  • Loading branch information
joe94 authored May 19, 2021
1 parent 2d99e76 commit 5f03801
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]
- Allow auth package client code to pass the basculehttp.OnErrorHTTPResponse option. [#174](https://github.com/xmidt-org/argus/pull/174)
- Fix bug that did not include context (with tracing data) in outgoing requests. [#176](https://github.com/xmidt-org/argus/pull/176)

## [v0.3.15]
- Add optional OpenTelemetry tracing feature. [#170](https://github.com/xmidt-org/argus/pull/170) thanks to @utsavbatra5
Expand Down
2 changes: 1 addition & 1 deletion chrysom/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func buildTokenAcquirer(auth *Auth) (acquire.Acquirer, error) {
}

func (c *Client) sendRequest(ctx context.Context, owner, method, url string, body io.Reader) (response, error) {
r, err := http.NewRequest(method, url, body)
r, err := http.NewRequestWithContext(ctx, method, url, body)
if err != nil {
return response{}, fmt.Errorf(errWrappedFmt, errNewRequestFailure, err.Error())
}
Expand Down

0 comments on commit 5f03801

Please sign in to comment.