Skip to content

feat(node): Use new integration APIs #9821

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

Closed

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Dec 13, 2023

In the spirit of keeping my other PR smaller, this PR updates the Node integrations to use the new APIs which is a requirement for my PR!

@mydea
Copy link
Member

mydea commented Dec 13, 2023

Ah, this is a duplicate of my (older) open PR: #9018 but with localvariables added (I left that as it seemed more complicated).

Also not sure if the http one actually works, as it monkey patches 🤔 which probably still has to happen in setupOnce I guess?

Ideally - and this is one of the larger open things for improving the integrations for v8 - we'd refactor all integrations that currently do monkey patching, to separate the monkey patching from the instrumentation. e.g. something like this:

{
  setupOnce() {
    fill(httpsModule, 'get', function() {
      notifyHandlers();
      // ...
    }
  },
  setup() {
    addHandler()'
   }
}

Do you know what I mean? Similar to how we instrument in utils e.g. instrument/fetch.ts etc.

@timfish
Copy link
Collaborator Author

timfish commented Dec 13, 2023

Ah thanks, #9018 should be fine actually since I only really need Context and Modules to be updated!

@timfish timfish closed this Dec 13, 2023
@timfish timfish deleted the feat/node-integration-apis branch December 13, 2023 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants