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 protocol detection for get/request calls without explicit protocol #3950

Merged
merged 1 commit into from Sep 2, 2021

Commits on Sep 1, 2021

  1. 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`.
    thomaspurchas committed Sep 1, 2021
    Copy the full SHA
    18f0e6d View commit details
    Browse the repository at this point in the history