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

@datadog/native-metrics

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datadog/native-metrics

Native metrics collector for libuv and v8

  • 1.5.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.7M
decreased by-6.52%
Maintainers
1
Weekly downloads
 
Created

What is @datadog/native-metrics?

The @datadog/native-metrics package is designed to provide native system metrics for Node.js applications. It allows Datadog users to collect and report metrics such as garbage collection, heap statistics, and other Node.js process-level metrics to the Datadog platform, where they can be visualized and monitored.

What are @datadog/native-metrics's main functionalities?

Garbage Collection Metrics

This feature allows you to monitor garbage collection events in your Node.js application. The event listener logs information about each garbage collection event.

const NativeMetrics = require('@datadog/native-metrics');
const metrics = new NativeMetrics();
metrics.on('gc', (info) => {
  console.log('GC event info:', info);
});

Heap Statistics

This feature provides heap statistics from the V8 engine at regular intervals. It can be used to monitor the memory usage of your Node.js application.

const NativeMetrics = require('@datadog/native-metrics');
const metrics = new NativeMetrics();
setInterval(() => {
  const stats = metrics.getHeapStatistics();
  console.log('Heap stats:', stats);
}, 10000);

Event Loop Lag

This feature measures the lag in the Node.js event loop, which can be an indicator of the application's responsiveness.

const NativeMetrics = require('@datadog/native-metrics');
const metrics = new NativeMetrics();
setInterval(() => {
  const lag = metrics.getLoopDelay();
  console.log('Event loop lag:', lag);
}, 10000);

Other packages similar to @datadog/native-metrics

Keywords

FAQs

Package last updated on 01 Nov 2022

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