Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dtrace-provider

Package Overview
Dependencies
Maintainers
4
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dtrace-provider

Native DTrace providers for node.js applications

  • 0.8.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.8M
decreased by-11.02%
Maintainers
4
Weekly downloads
 
Created

What is dtrace-provider?

The dtrace-provider package is a Node.js module that allows you to create DTrace providers for Node.js applications. DTrace is a comprehensive dynamic tracing framework that is available on some operating systems like Solaris, macOS, and FreeBSD. It enables you to get insights into the behavior of your software, allowing for performance analysis and troubleshooting.

What are dtrace-provider's main functionalities?

Creating a DTrace provider

This code sample demonstrates how to create a new DTrace provider with a single probe. The probe is named 'probe-name' and expects an integer and a string argument.

var dtrace = require('dtrace-provider');
var dtp = dtrace.createDTraceProvider('nodeapp');
var probe = dtp.addProbe('probe-name', 'int', 'char *');
dtp.enable();

Firing a probe

This code sample shows how to fire a probe with the specified arguments. When the probe is fired, the function provided to 'fire' is called, and the return value is used as the arguments for the probe.

probe.fire(function() {
  return [42, 'hello world'];
});

Other packages similar to dtrace-provider

Keywords

FAQs

Package last updated on 17 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc