Releases: Julien-R44/adonisjs-prometheus
Release list
Adonis7 Support
- chore: fix some metas (da4fd4a)
- chore: move to oxc (4ed1c76)
- chore: update dependencies (f7dacdd)
- ci: test on node 24 (76ad6ed)
What's Changed
- feat: new version for AdonisJS 6 by @Julien-R44 in #13
Full Changelog: v0.0.8...v2.1.0
Adonis 7 release
New cache collector
New cache collector
Added a new implementation for the Cache Collector that leverages BentoCache's native Prometheus plugin. This provides richer metrics and better integration with BentoCache.
Usage:
cacheCollector({
useNewCollector: true, // Enable it !
keyGroups: [
[/^users:(\d+)$/, 'users:*'],
]
})New Metrics Available:
cache_hits: Total cache hitscache_misses: Total cache missescache_writes: Total cache writescache_deletes: Total cache deletescache_clears: Total cache clearscache_graced_hits: Total graced hitscache_bus_messages_published: Bus messages publishedcache_bus_messages_received: Bus messages received
useNewCollector: truewill become the default in a future major release. We recommend migrating to it now to prepare for this change. Previous collector will be deleted.
Exemplars + CIDR
Release Notes - v1.3.0
New Features
Exemplars Support
You can now enable OpenMetrics exemplars to link your metrics to traces. When enabled, traceId and spanId from active OpenTelemetry spans are automatically attached to Counter and Histogram metrics.
// config/prometheus.ts
export default defineConfig({
enableExemplars: true,
// ...
})Setup:
- Install
@opentelemetry/api - Set
enableExemplars: truein your config - Ensure your app is instrumented with OTEL
The registry automatically switches to OpenMetrics format when exemplars are enabled. Custom metrics without enableExemplars on the metric itself can still use the standard prom-client API.
CIDR Support for IP Whitelist
The ipsWhitelist option now supports CIDR notation, making it easier to allow access from subnets or VPC ranges in cloud environments.
// config/prometheus.ts
export default defineConfig({
ipsWhitelist: [
'10.0.0.5', // Exact IP
'192.168.1.0/24', // CIDR range
'172.16.0.0/16', // Larger subnet
],
// ...
})Both IPv4 and IPv6 CIDR ranges are supported
Bug fixes
- SystemCollector now correctly applies the defined
prefix. Previously, metrics were exposed asprocess_cpu_seconds_total, but they will now appear as{prefix}_process_cpu_seconds_total.
So make sure to update your queries if you were relying on this bug.
Full Changelog: v1.2.0...v1.3.0
@julr/adonisjs-prometheus@1.1.0
AdonisJS 6 Version
The package has been rewritten from scratch for AdonisJS 6. Lots of changes! I recommend to read the README to learn more about the new functionality of the package.
We now include an entire "collector" system with many more metrics available out-of-the-box compared to version 5:
- HTTP Collector
- Lucid Collector
- Cache Collector
- Mail Collector
- System Collector
Possibly more to come soon. The package is super easy to extend thanks to this collector system.
Check out the README: https://github.com/Julien-R44/adonisjs-prometheus
v0.0.8
No significant changes
View changes on GitHub
Update dependencies
Update dependencies, some refactor and add testing
v0.0.6
v0.0.5
- 🐛 fix dashboard bug. data source needed to be defined as variable close #8 802ddf8
- ✨
httpMetric.excludedRoutescan now be a function close #7 9e33bcc - Merge branch 'main' of https://github.com/Julien-R44/adonis5-prometheus 2d40408
- ✨ added typings for config file close #5 e7a49dc
- Update README.md 98affa0