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

Allow more fine grained disabling of http module features #434

Closed
watson opened this issue Jul 4, 2018 · 2 comments · Fixed by #1298
Closed

Allow more fine grained disabling of http module features #434

watson opened this issue Jul 4, 2018 · 2 comments · Fixed by #1298

Comments

@watson
Copy link
Contributor

watson commented Jul 4, 2018

It's not possible to switch off the automatic creation of HTTP request transactions when an incoming HTTP request is detected without also switching off tracing of outgoing HTTP requests. This is because they are both controlled by this cone setting: disableInstrumentations: ['http'].

It would be very useful - both to users, but especially also during debugging - if it was possible to control the two features separately.

Considerations

Today there's a one to one relationship between npm package names and the content of the disableInstrumentations config option. I don't think it would be a good idea to introduce an exception just to solve this case.

As an alternative we could consider if the config option instead should focus on span types, so instead of disabling pg, you would disable db.postgresql (the full type is db.postgresql.query, but I guess we can just match against the start of the string, which also means that we could write db to disable all db spans).

There's pros and cons to this, so it should be considered thoroughly.

@watson
Copy link
Contributor Author

watson commented Sep 20, 2018

Suggested solution: disableInstrumentations: ['http'] should only disable instrumentation of http.request. Automatic creation of transactions based on incoming http requests should be controlled by another config option, e.g. monitorIncomingHTTPRequests which defaults to true.

@watson watson added this to the v2.0.0 milestone Sep 20, 2018
@watson
Copy link
Contributor Author

watson commented Sep 20, 2018

If this turns out to be complicated, we can move it to 3.0.0.

Qard pushed a commit to Qard/apm-agent-nodejs that referenced this issue Oct 19, 2018
Qard pushed a commit to Qard/apm-agent-nodejs that referenced this issue Oct 19, 2018
@Qard Qard self-assigned this Oct 26, 2018
Qard pushed a commit to Qard/apm-agent-nodejs that referenced this issue Oct 29, 2018
Qard pushed a commit to Qard/apm-agent-nodejs that referenced this issue Oct 31, 2018
Qard pushed a commit to Qard/apm-agent-nodejs that referenced this issue Nov 6, 2018
@watson watson removed this from the v2.0.0 milestone Nov 14, 2018
@watson watson added this to the v3.0.0 milestone Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants