Metrics
How do I use this?
const Metrics = ;const LogstashJSON = MetricsFormatter;const Udp = MetricsOutput;const ApplicationVersion Node Rancher = MetricsPlugin; const metrics = formatter: output: ; metrics;metrics; const metricsWithPlugins = ; metricsWithPlugins;// {"measurement":"measurement_3","a":1,"node_version":"v6.3.0","npm_version":"0.0.1"} // Example of setup in productionconst metrics2 = ;
Plugins
Application Version
Adds the version
found in the package.json
file of the current working directory to metrics.
Node Version
Adds the node
version as reported by process.version
to metrics.
Rancher
Uses the Rancher metadata service to add stack, service, container and host information to metrics.
Changelog
Version | Description |
---|---|
0.2.1 | Remove unused dependency |
0.2.0 | Rename Npm plugin to ApplicationVersion |
0.1.4 | Make it easier to configure Rancher metadata. Use request instead of fetch since fetch caused issues in some test frameworks because of global variables |
0.1.3 | Get envrionment from rancher metadata service |
0.1.2 | Add basic logging |
0.1.1 | Fix timestamps for logstash json, update readme |
0.1.0 | Add basic plugin support, for Rancher, Node and Npm information |
0.0.2 | Add support for JSON formatter |
0.0.1 | Support for InfluxdbLineProtocol and TCP/UDP output |