Download the PHP package theihasan/nightwatch-prometheus without Composer

On this page you can find all versions of the php package theihasan/nightwatch-prometheus. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nightwatch-prometheus

Nightwatch Promethus

theihasan/nightwatch-prometheus exposes Laravel Nightwatch records as Prometheus metrics.

It runs on top of laravel/nightwatch, but it does not require a Nightwatch subscription. Nightwatch is used as the in-app event collection layer, while this package replaces Nightwatch's default ingest path and exports metrics for Prometheus scraping.

Requirements

How It Works

Nightwatch Subscription

This package does not need a Nightwatch subscription.

You still install and enable laravel/nightwatch, but you do not need to send data to the Nightwatch hosted service. This package uses Nightwatch's local record generation only.

Installation

Install Nightwatch and this package:

Publish the package config:

Minimal Nightwatch Setup

Enable Nightwatch in your app and keep sampling at 1.0 for accurate counters.

Example .env values:

Notes:

Routes

By default:

The metrics route is enabled by default.

The debug route is disabled by default in production unless explicitly enabled.

Configurable route settings live in config/nightwatch-promethus.php.

Available Metrics

Currently implemented:

Log Metric Caution

nightwatch_logs_total is verified working through the dedicated Nightwatch log channel.

If you want normal application logs to be captured by Nightwatch in a typical Laravel stack setup, include the nightwatch channel in your log stack.

Example:

Then clear config:

Known Limitation

These two metrics are implemented in the package, but they may not appear in real worker flows until the upstream Nightwatch issue is fixed:

Upstream issue:

Current status:

Example PromQL

Request rate:

Requests by route:

95th percentile request duration:

Query count by route:

Database query rate by connection:

95th percentile database query duration:

Outgoing HTTP request rate by host:

95th percentile outgoing HTTP request duration:

Unhandled exceptions:

Command execution rate:

Job attempts by result:

Scheduled task runs:

Cache hit rate:

Cache miss rate:

Cache hit ratio:

Notification throughput by channel:

95th percentile notification duration:

Prometheus Scrape Config Example

If your metrics route path is customized in config/nightwatch-promethus.php, update metrics_path to match.


All versions of nightwatch-prometheus with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
laravel/nightwatch Version ^1.28
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package theihasan/nightwatch-prometheus contains the following files

Loading the files please wait ...