Download the PHP package chaseconey/laravel-datadog-helper without Composer
On this page you can find all versions of the php package chaseconey/laravel-datadog-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download chaseconey/laravel-datadog-helper
More information about chaseconey/laravel-datadog-helper
Files in chaseconey/laravel-datadog-helper
Package laravel-datadog-helper
Short Description A Laravel Datadog helper package.
License MIT
Homepage https://github.com/chaseconey/laravel-datadog-helper
Informations about the package laravel-datadog-helper
laravel-datadog-helper
Laravel Datadog Helper helps you get your application metrics integrated into Laravel as fast as possible.
Requirements
- Laravel >= 5
- Datadog API Key
Features
- Adds Datadog facade that wraps the official DataDog/php-datadogstatsd library
- Provides middleware for tracking response time metrics automatically
- Allows prefixing all metrics that are sent for the whole application with common prefix
Installation
Require this package with composer.
Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.
If you would like to install the request metric tracking middleware, add the Datadog middleware class like so:
Without Auto-Discovery (or Laravel < 5.5)
If you don't use auto-discovery, or you are using an older version of Laravel, add the ServiceProvider to the providers array in config/app.php
If you want to use the facade, add this to your facades in config/app.php
:
For configuration options, copy the package config to your local config with the publish command:
Middleware
This package comes with a handy middleware that you can add to any Laravel project to get up and running in Datadog as fast as possible.
- Metric Name:
request_time
- Value: The time it takes Laravel to respond to request
- Tags::
status_code
url
(toggle viadatadog.middleware_disable_url_tag
config option)- any custom tags you have added to
datadog.global_tags
With just these metrics here are a couple of example graphs that you can make:
Datadog Graph Config JSON
#### Max Request Time by URL #### Top Pages Hit #### Slowest Endpoints/Pages
Examples
This library wraps the official DataDog/php-datadogstatsd library. All functions are inherited from the core implementation provided by this library with the exception of replacing Datadogstatsd
with Datadog
(the facade).
For example:
Instead of doing Datadogstatsd::increment('my.sweet.metrics')
, you would use Datadog::increment('my.sweet.metrics')
.
For a full set of usage examples, check out the library's usage README.
Change log
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONDUCT for details.
Credits
- Chase Coney
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-datadog-helper with dependencies
datadog/php-datadogstatsd Version ^1.4.0
illuminate/support Version >=5.1