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

fix(instrumentation-http): Ensure instrumentation of http.get and https.get work when used in ESM code #4866

Merged
merged 11 commits into from
Jul 24, 2024

Commits on Jul 15, 2024

  1. fix(instrumentation-http): Ensure instrumentation of http.get and `…

    …https.get` work when used in ESM code
    
    The issue was that the `_wrap`ing of `http.get` was getting the
    just-wrapped `http.request` by accessing `moduleExports.request`.
    However, when wrapping an ES module the `moduleExports` object from IITM
    is a Proxy object that allows setting a property, but *not* re-getting
    that set property.
    
    The fix is to use the wrapped `http.request` from the `this._wrap` call.
    That required fixing a bug in the IITM code-path of
    `InstrumentationBase.prototype._wrap` to return the wrapped property.
    (The previous code was doing `return Object.defineProperty(...)`, which
    returns the moduleExports, not the defined property.)
    
    Fixes: open-telemetry#4857
    trentm committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    1563f93 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4eb8607 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    94933d6 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2024

  1. Configuration menu
    Copy the full SHA
    942aa19 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    28a81e7 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2024

  1. test name suggestion

    Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
    trentm and JamieDanielson committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    ed68ff7 View commit details
    Browse the repository at this point in the history
  2. test name suggestion

    Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
    trentm and JamieDanielson committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    5a40e94 View commit details
    Browse the repository at this point in the history
  3. test name suggestion

    Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
    trentm and JamieDanielson committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    4ff3771 View commit details
    Browse the repository at this point in the history
  4. test name suggestion

    Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
    trentm and JamieDanielson committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    71811c4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8eb6c7d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    011af25 View commit details
    Browse the repository at this point in the history