generated from honeycombio/.github
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add configurable list of HTTP headers to extract (#277)
## Which problem is this PR solving? The current list of HTTP headers that are extracted for request/response pairs is limited to just `User-Agent`. This PR adds a configuration option to provide a custom set of headers that will be extracted from HTTP request/response pair. The agent looks in the new `HTTP_HEADERS` env var for a comma separated list of headers to extract in place of default set of headers. - Closes #215 ## Short description of the changes - Move default headers to extract from http parser to config - Add `HTTPHeadersToExtract` to config struct which is populated from the default set plus any additional headers found in `HTTP_HEADERS` env var - Add new `LookupEnvAsStringSlice` func to utils that is used to get the list of headers - Update HTTP Parser to take the list of headers to extract as part of `NewHTTPParser` - Add unit tests to config and http parser - Add new env var to README ## How to verify that this has the expected result When configuring the agent, a list of additional HTTP headers can be set and will be extracted from HTTP request/responses. --------- Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com> Co-authored-by: Robb Kidd <robbkidd@honeycomb.io>
- Loading branch information
1 parent
e25f2fe
commit 5cc0ff5
Showing
7 changed files
with
91 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters