Reputation: 31
Are there any standard metrics publishing packages for node.js? I'm not asking about general metrics libraries, but rather packages that produce a specific set of metrics (e.g. http QPS, runtime memory usage, gc stats, etc...) If you wanted to offer a monitoring service for node.js users, what would you monitor?
Upvotes: 2
Views: 1981
Reputation: 12887
I think you're looking for @opentelemetry/sdk-metrics
. It's about as standard as you get for 2024. Most metrics aggregators, both commercial and open-source, support ingesting metrics from opentelemetry now.
Upvotes: 0
Reputation: 1856
I'm not aware of any package that provides all of that metrics but you can collect most using very popular libraries like pidusage for process related metrics, mongodb driver to retrieve mongo stats, etc
You may read here (my post, bullet 12) about memory profiling
Upvotes: -1
Reputation: 292
I believe that Node Application Metrics ('appmetrics') provides what your looking for. This is a module that provides a set of metrics about a running Node.js process, rather than a monitoring solution in itself.
In version 1.0.2 is provides the following data types:
Upvotes: 3