[Module Listing Request]: `nuxt-monitoring`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.1k
- Forks
- 354
- Avg merge
- 10h 18m
- Merged PRs (30d)
- 12
Description
Description
A Nuxt module for deep observability, providing separate debug server, health checks, and comprehensive metrics collection.
Features
- 🐞 Debug server for monitoring endpoints on a separate port
- 🩺 /health endpoint for health checks
- 🚀 /ready endpoint for readiness probes
- 📊 Standard metrics collection via prom-client
- ➕ Additional metrics collection
- ✨ Ability to collect custom metrics
- 🐢 Lazy loading of endpoints
Additional Metrics
The module provides comprehensive metrics collection through the following categories:
HTTP Request Metrics
The module automatically tracks key HTTP request metrics:
| Metric Name | Type | Labels | Description |
|---|---|---|---|
http_request_total |
Counter | method, route, status_code |
Total number of HTTP requests |
http_request_duration_seconds |
Summary | method, route, status_code |
Duration of HTTP requests in seconds |
http_active_requests |
Gauge | — | Number of active HTTP requests |
Standard Node.js Runtime Metrics
Through integration with prom-client, the module automatically collects essential Node.js runtime metrics:
- CPU usage and utilization
- Memory usage (heap and system)
- Event loop lag and duration
- Garbage collection statistics
- Node.js version and process information
- OS-level metrics (platform, architecture, etc.)
Custom Metrics
The module provides a flexible API for collecting custom metrics. Developers can define their own counters, gauges, histograms, and summaries to track application-specific business metrics or performance indicators.
All metrics are exposed in the standard Prometheus format and can be scraped by any Prometheus-compatible monitoring system.
Configuration
The module supports the following configuration options with these defaults:
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['nuxt-monitoring'],
monitoring: {
// Metrics collection (enabled by default)
metrics: {
enabled: true,
path: '/metrics'
},
// Health check endpoint (enabled by default)
healthCheck: {
enabled: true,
path: '/health'
},
// Readiness check endpoint (enabled by default)
readyCheck: {
enabled: true,
path: '/ready'
},
// Debug server on separate port (disabled by default)
debugServer: {
enabled: false,
port: 3001
}
}
})
You can customize any of these options. For example, to enable the debug server:
export default defineNuxtConfig({
modules: ['nuxt-monitoring'],
monitoring: {
debugServer: {
enabled: true,
port: 3001
}
}
})
Contribution
Local development
# Install dependencies
npm install
# Generate type stubs
npm run dev:prepare
# Develop with the playground
npm run dev
# Build the playground
npm run dev:build
# Run ESLint
npm run lint
# Run Vitest
npm run test
npm run test:watch
# Release new version
npm run release
License
MIT License - see LICENSE
Repository
https://github.com/NZ-WEB/nuxt-monitoring/blob/main/README.md?plain=1
npm
https://www.npmjs.com/package/nuxt-monitoring
Nuxt Compatibility
Nuxt 4, Nuxt 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked nuxt-monitoring README and npm package information, then inspect the Nuxt modules repository for its module listing contribution process. Confirm the module name, repository URL, Nuxt 3 and 4 compatibility, and monitoring features before adding the listing; done means the module is represented accurately in the catalog.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, prometheus, typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100