Library to gather runtime metrics for Node.js applications using spectator-js.
See the Atlas Documentation site for more details on spectator-js
.
const spectator = require('nflx-spectator');
const config = new spectator.Config("udp", {"platform": "express-demo"});
const registry = new spectator.Registry(config);
const nodejsMetrics = require('nflx-spectator-nodejsmetrics');
const runtimeMetrics = new nodejsMetrics.RuntimeMetrics(registry);
runtimeMetrics.start();
// application
runtimeMetrics.stop();
import {Config, Registry} from "nflx-spectator";
import {RuntimeMetrics} from "nflx-spectator-nodejsmetrics";
const config = new Config("udp", {"platform": "express-demo"});
const registry = new Registry(config);
const runtimeMetrics = new RuntimeMetrics(registry);
runtimeMetrics.start();
// application
runtimeMetrics.stop();