-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0112ab7
commit aad027e
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# StatsD Client Adapter | ||
This package was originally designed to solve the problem of: | ||
* I use DataDog on production, but | ||
* I don't want to push stats to DataDog on my dev environments | ||
|
||
Where might I want to push those precious stats? Maybe to a log? Maybe to a locally running [StatsD server](https://github.com/statsd/statsd)? | ||
|
||
While [PHP League's statsd package](https://github.com/thephpleague/statsd) is great, it doesn't allow for sending stats to DataDog | ||
(such as [histogram](https://docs.datadoghq.com/metrics/types/?tab=histogram) or [distribution](https://docs.datadoghq.com/metrics/types/?tab=distribution)). | ||
Nor does the DataDog client allow for pushing to another StatsD implementation easily. | ||
|
||
The aim here is to allow for a single interface that can wrap around both, and be easily extended for different implementations. | ||
|
||
## Gotchas | ||
1. Only increment/decrement on PHPLeague's implementation allow for including the sample rate. If you are using a sample rate with other calls, their sample rate will not be included as part of the stat. | ||
2. There are `histogram()` and `distribution()` methods on `LeagueStatsDClientAdapter`, but they only raise a PHP error and are no-op. |