Library for event tracing using a dtrace, note returns a dummy provider if not available.


Simple library for event tracing using a number of other libraries which can be enabled or disabled as required.

The aim of this library is to provide a simple way of integrating dtrace or alternatively log based tracing within a node.js javascript library.

Install the module with: npm install dtracer

This library will optionally load the dtrace provider and provides a number of utility methods for adding and firing probes.

The default tracer is accessible through the tracer module directly.

var dtracer = require('dtracer')
// configures an application with DTrace used as the default provider
    .addProbe("startChild", "int", "char*")
    .addProbe("stopChild", "int", "char*")
    .addProbe("onExit", "int", "char*")
tracer.probes.startChild(123, "cool new child") // fire a probe with the previously specified parameters

Note: As per limitations with the node-dtrace-provider you only get 6 arguments per probe to play with, so choose wisely.

(Coming soon)

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Copyright (c) 2013 Mark Wolfe
Licensed under the MIT license.