Download the PHP package modernmcguire/overwatch without Composer
On this page you can find all versions of the php package modernmcguire/overwatch. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download modernmcguire/overwatch
More information about modernmcguire/overwatch
Files in modernmcguire/overwatch
Package overwatch
Short Description Configure and provide customizable Stripe data via RESTful endpoint.
License MIT
Homepage https://github.com/modernmcguire/overwatch
Informations about the package overwatch
Overwatch
This package allows you to define custom metrics for a Laravel application and retrieve them either through an HTTP request or a command.
Installation
You can install the package via composer:
To create a new overwatch secret key for your application, use the following command:
You can publish the config file with:
This is the contents of the published config file which will include the laravel and php version by default:
Usage
Overwatch works by querying your application for Metrics that you want to track. You can create your own metrics by extending the Metric
class and implementing the handle()
method.
By default the metric will be snake cased and returned as a string. You can customize this by providing a constant KEY in your metrics.
Now that you have a new metric to watch, let's add it to your config.
Security
In order to protect sensitive metrics, Overwatch requires a secret key to be provided in the request. This secret key is used to encrypt the payload and verify the request came from a trusted source.
To generate a secret key, use the following command:
This will generate a new secret key and store it in your .env
file. You can also set the secret key manually by adding the following to your .env
file:
Fetching Data
To get metric data on an application that has Overwatch installed, you can make a POST request to the /overwatch
route. The payload should be encrypted using the secret key that was generated for your application.
Command
You can also retrieve metrics from the command line using the overwatch:metrics
command.
This will return a table response of all the metrics that are defined in your config.
Or you can pass in the --json
flag to get a json response.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Modern Mcguire
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of overwatch with dependencies
illuminate/contracts Version ^8.0|^9.0|^10.0|^11.0
illuminate/routing Version ^8.0|^9.0|^10.0|^11.0
spatie/laravel-package-tools Version ^1.0