-
Notifications
You must be signed in to change notification settings - Fork 983
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
Feature Request: A setting to turn Dtrace off so that it can run on heroku #80
Comments
This also appears to be a factor limiting its ability to install on Windows. I'm sure it would run fine without the DTrace magic. +1 |
I'm also getting an error building dtrace, when all I need is vanilla Restify. Also planning on deploying to Heroku. I'd love the ability to install without dtrace, or at least turn it off. Thanks! |
I was running into the same issue so I cobbled a quick hack together; it's diff --git a/lib/index.js b/lib/index.js
index 2a63730..e1b1ac2 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -2,7 +2,6 @@
var assert = require('assert');
-var d = require('dtrace-provider');
var Logger = require('bunyan');
var mime = require('mime');
@@ -24,6 +23,16 @@ var JsonClient = clients.JsonClient;
var StringClient = clients.StringClient;
+///--- Fake DTrace
+
+!function(methods) {
+ var nop = function() {},
+ proto = nop.prototype;
+ methods.forEach(function(method) {
+ proto[method] = nop;
+ });
+ DTRACE = new nop;
+}(['addProbe', 'enable', 'fire']);
///--- Helpers
diff --git a/package.json b/package.json
index 6ff307b..f856a15 100644
--- a/package.json
+++ b/package.json
@@ -34,7 +34,6 @@
"async": "0.1.18",
"bunyan": "0.6.8",
"formidable": "1.0.9",
- "dtrace-provider": "0.0.6",
"http-signature": "0.9.8",
"lru-cache": "1.0.5",
"mime": "1.2.5", |
I've fixed this issue under #100 - to work "smoothly" it will require npm 1.1.5. |
I'm getting a [Error: Cannot find module './DTraceProviderBindings'] error on heroku... Possibly because Dtrace is not supported on the heroku platform? Is there a suggested way of running restify on heroku? Perhaps being able to turn dtrace off?
The text was updated successfully, but these errors were encountered: