mirror of
https://github.com/hanzoai/node-dtrace-provider.git
synced 2026-09-23 23:48:45 +00:00
This change allows objects to be passed as argument values, using a "json" type which is implemented as a regular char * argument, but with serialising of the object to JSON.
13 lines
264 B
JavaScript
13 lines
264 B
JavaScript
var d = require('../dtrace-provider');
|
|
var provider = d.createDTraceProvider("nodeapp");
|
|
var probe = provider.addProbe("json1", "json");
|
|
provider.enable();
|
|
|
|
var obj = new Object;
|
|
obj.foo = 42;
|
|
obj.bar = 'forty-two';
|
|
|
|
probe.fire(function(p) {
|
|
return [obj];
|
|
});
|