
Security News
Rust RFC Proposes a Security Tab on crates.io for RustSec Advisories
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.
@opentelemetry/exporter-prometheus
Advanced tools
OpenTelemetry Exporter Prometheus provides a metrics endpoint for Prometheus
Note: This is an experimental package under active development. New releases may include breaking changes.
The OpenTelemetry Prometheus Metrics Exporter allows the user to send collected OpenTelemetry Metrics to Prometheus.
Prometheus is a monitoring system that collects metrics, by scraping exposed endpoints at regular intervals, evaluating rule expressions. It can also trigger alerts if certain conditions are met. For assistance setting up Prometheus, Click here for a guided codelab.
npm install --save @opentelemetry/sdk-metrics
npm install --save @opentelemetry/exporter-prometheus
Create & register the exporter on your application.
const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');
const { MeterProvider } = require('@opentelemetry/sdk-metrics');
// Add your port and startServer to the Prometheus options
const options = {port: 9464};
const exporter = new PrometheusExporter(options);
// Creates MeterProvider and installs the exporter as a MetricReader
const meterProvider = new MeterProvider({
readers: [exporter],
});
const meter = meterProvider.getMeter('example-prometheus');
// Now, start recording data
const counter = meter.createCounter('metric_name', {
description: 'Example of a counter'
});
counter.add(10, { pid: process.pid });
// .. some other work
With the above you should now be able to navigate to the Prometheus UI at: http://localhost:9464/metrics
Apache 2.0 - See LICENSE for more information.
prom-client is a Prometheus client for Node.js that allows you to create and expose metrics to be scraped by a Prometheus server. Unlike @opentelemetry/exporter-prometheus, which integrates with OpenTelemetry, prom-client is a standalone library specifically for Prometheus.
prometheus-api-metrics is a middleware for Express.js that automatically collects and exposes metrics for HTTP requests. It is more focused on web server metrics and does not provide the broader OpenTelemetry integration that @opentelemetry/exporter-prometheus offers.
prometheus-gc-stats is a library that collects garbage collection metrics from Node.js and exposes them to Prometheus. It is specialized for GC metrics, whereas @opentelemetry/exporter-prometheus can handle a wider range of metrics through OpenTelemetry.
FAQs
OpenTelemetry Exporter Prometheus provides a metrics endpoint for Prometheus
The npm package @opentelemetry/exporter-prometheus receives a total of 2,520,517 weekly downloads. As such, @opentelemetry/exporter-prometheus popularity was classified as popular.
We found that @opentelemetry/exporter-prometheus demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.

Security News
/Research
Socket found a Rust typosquat (finch-rust) that loads sha-rust to steal credentials, using impersonation and an unpinned dependency to auto-deliver updates.

Research
/Security Fundamentals
A pair of typosquatted Go packages posing as Google’s UUID library quietly turn helper functions into encrypted exfiltration channels to a paste site, putting developer and CI data at risk.