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

Disable plugins feature (DD_INTEGRATIONS_DISABLED) #663

Closed
tot-ra opened this issue Aug 28, 2019 · 4 comments
Closed

Disable plugins feature (DD_INTEGRATIONS_DISABLED) #663

tot-ra opened this issue Aug 28, 2019 · 4 comments

Comments

@tot-ra
Copy link

tot-ra commented Aug 28, 2019

php extension can accept env var DD_INTEGRATIONS_DISABLED to disable certain (unstable?) plugins. Seems that dd-trace-js doesn't have this feature (http for example seems to always intercept requests). Would be nice to have black list of disabled plugins

@rochdev
Copy link
Member

rochdev commented Aug 28, 2019

Right now this can only be configured programmatically. I agree we should add an environment variable too since it would make it easier to disable plugins without any code change.

In the meantime, it would be possible to do something like this as a workaround:

// DD_INTEGRATIONS_DISABLED=express,pg

if (process.env.DD_INTEGRATIONS_DISABLED) {
  process.env.DD_INTEGRATIONS_DISABLED.split(',').forEach(name => {
    tracer.use(name, false)
  })
}

@tot-ra
Copy link
Author

tot-ra commented Aug 28, 2019

And how do I do it in typescript, if tracer wants specific type? :suspect:

@rochdev
Copy link
Member

rochdev commented Aug 28, 2019

name as any works for me. Hopefully your linter doesn't disagree 😅

@andrewsouthard1
Copy link

Was merged in #733

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants