Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add protocol detection for get/request calls without explict protocol
You can call `get`/`request` on `http`/`https` without providing an explicit protocol in the request options. In this case the protocol is automatically set based on which module you made the call to. Previously calls like this would result in breadcrumbs and traces without a protocol in the URL creating downstream issues for consumers of Breadcrumbs as the missing protocol results in URL throwing parsing errors. We now attempt to get the protocol by either extracting it from the `agent` passed as part of the request options, or by extracting it from the `globalAgent` on which ever http module is pass in `this`.
- Loading branch information
1 parent
295d263
commit 18f0e6d
Showing
3 changed files
with
99 additions
and
1 deletion.
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