Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a ‘Headers’ field to HTTPClientSettings #1551

Closed
huyan0 opened this issue Aug 14, 2020 · 0 comments
Closed

Add a ‘Headers’ field to HTTPClientSettings #1551

huyan0 opened this issue Aug 14, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@huyan0
Copy link
Member

huyan0 commented Aug 14, 2020

Is your feature request related to a problem? Please describe.
The Prometheus remote-write exporter wants to allow users to specify any headers they would like to add to each outgoing HTTP request. Other exporters that use the HTTP protocol may need the same feature for adding headers to their http requests.

Describe the solution you'd like
As suggested by @bogdandrutu in PR #1544, the HTTPClientSetting should have a ‘Headers’ field. The HTTP client generated from the HTTPClientSetting should implement a custom RoundTripper that adds the headers to each outgoing request.

Additional context
PR #1552 implements the above solution

@andrewhsu andrewhsu added the enhancement New feature or request label Jan 6, 2021
MovieStoreGuy pushed a commit to atlassian-forks/opentelemetry-collector that referenced this issue Nov 11, 2021
* Vendor Thrift dependency

* Fix build

* Changelog entry

* Ignore third_party for coverage purposes

* Re-run tests

* Re-run tests

* Re-run tests

* Re-run tests

* Relax time comparisons

Fixes open-telemetry#1559.

Some unit tests were flaking in CI because they expected the timestamp
to advance during a test, when it's possible for it to be unchanged
instead. This change switches the offending "<" comparisons to "<=".

* Re-run tests

* Relax more time comparisons

* Re-run tests

Co-authored-by: Tyler Yahn <[email protected]>
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this issue Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants