0.35.1 • Published 13 days ago
@opentelemetry/host-metrics v0.35.1
OpenTelemetry Host Metrics for Node.js
This module provides automatic collection of Host Metrics which includes metrics for:
- CPU
- Memory
- Network
Compatible with OpenTelemetry JS API and SDK 1.0+
.
Installation
npm install --save @opentelemetry/host-metrics
Usage
const { MeterProvider } = require('@opentelemetry/sdk-metrics');
const { HostMetrics } = require('@opentelemetry/host-metrics');
const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');
const exporter = new PrometheusExporter(
{
startServer: true
}, () => {
console.log('prometheus scrape endpoint: http://localhost:9464/metrics')
}
);
const meterProvider = new MeterProvider();
meterProvider.addMetricReader(exporter);
const hostMetrics = new HostMetrics({ meterProvider, name: 'example-host-metrics' });
hostMetrics.start();
Useful links
- For more information on OpenTelemetry, visit: https://opentelemetry.io/
- For more about OpenTelemetry JavaScript: https://github.com/open-telemetry/opentelemetry-js
- For help or feedback on this project, join us in GitHub Discussions
License
APACHE 2.0 - See LICENSE for more information.
0.35.1
13 days ago
0.35.0
3 months ago
0.34.1
4 months ago
0.34.0
5 months ago
0.33.2
6 months ago
0.33.1
9 months ago
0.33.0
10 months ago
0.32.2
12 months ago
0.32.1
1 year ago
0.32.0
1 year ago
0.31.0
1 year ago
0.30.1
2 years ago
0.30.0
2 years ago
0.29.0
2 years ago
0.28.0
2 years ago
0.27.1
2 years ago
0.27.0
2 years ago
0.26.0
3 years ago
0.25.0
3 years ago
0.24.0
3 years ago
0.23.0
3 years ago
0.22.0
3 years ago
0.21.0
3 years ago
0.20.0
3 years ago
0.16.0
3 years ago
0.15.0
3 years ago
0.14.0
3 years ago
0.13.1
3 years ago
0.13.0
3 years ago
0.12.1
3 years ago
0.12.0
3 years ago
0.11.0
4 years ago