Skip to content

If the platform looks like it should have DTrace available, log a failure to load the bindings. #106

Description

@zhy1
var os, fs, dtrace;
if (runtimeEnv === 'browser') {
    os = {
        hostname: function () {
            return window.location.host;
        }
    };
    fs = {};
    dtrace = null;
} else {
    os = require('os');
    fs = require('fs');
    try {
        dtrace = require('dtrace-provider' + '');
    } catch (e) {
        dtrace = null;
    }
}
If the platform looks like it  should  have DTrace  available, log a failure to load the bindings.

```
![image](https://user-images.githubusercontent.com/14029393/32403335-39efc426-c105-11e7-93e9-4489f191f4a8.png)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions