Skip to content

Releases: Julien-R44/adonisjs-prometheus

Adonis7 Support

Choose a tag to compare

@Julien-R44 Julien-R44 released this 02 Mar 23:16

What's Changed

Full Changelog: v0.0.8...v2.1.0

Adonis 7 release

Adonis 7 release Pre-release
Pre-release

Choose a tag to compare

@Julien-R44 Julien-R44 released this 19 Jan 22:50

New cache collector

Choose a tag to compare

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 hits
  • cache_misses: Total cache misses
  • cache_writes: Total cache writes
  • cache_deletes: Total cache deletes
  • cache_clears: Total cache clears
  • cache_graced_hits: Total graced hits
  • cache_bus_messages_published: Bus messages published
  • cache_bus_messages_received: Bus messages received

useNewCollector: true will 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

Choose a tag to compare

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:

  1. Install @opentelemetry/api
  2. Set enableExemplars: true in your config
  3. 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 as process_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

Choose a tag to compare

AdonisJS 6 Version

Choose a tag to compare

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

Choose a tag to compare

@github-actions github-actions released this 01 May 19:56

No significant changes

    View changes on GitHub

Update dependencies

Choose a tag to compare

@Julien-R44 Julien-R44 released this 03 Sep 22:08

Update dependencies, some refactor and add testing

v0.0.6

Choose a tag to compare

@Julien-R44 Julien-R44 released this 03 Jan 18:31
🔖 0.0.6

v0.0.5

Choose a tag to compare

@Julien-R44 Julien-R44 released this 03 Jan 18:22

v0.0.4...v0.0.5