Skip to content

Commit 9b38e93

Browse files
author
Justin Hayes
authored
Merge pull request #2 from jshayes/add-config-file
Add the config file
2 parents 89ef835 + 5e4ef45 commit 9b38e93

File tree

3 files changed

+72
-2
lines changed

3 files changed

+72
-2
lines changed

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
}
2424
},
2525
"require-dev": {
26-
"phpunit/phpunit": "^7.4",
27-
"orchestra/testbench": "^3.0"
26+
"phpunit/phpunit": "^6.0|^7.0",
27+
"orchestra/testbench": "^3.0",
28+
"mockery/mockery": "^1.2"
2829
},
2930
"extra": {
3031
"laravel": {

config/datadog.php

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| DogStatsd Driver
8+
|--------------------------------------------------------------------------
9+
|
10+
| This option defines the DogStatsd type to use. The name specified in this
11+
| option should match one of the drivers defined in the "drivers"
12+
| configuration array.
13+
|
14+
*/
15+
16+
'driver' => 'batched',
17+
18+
/*
19+
|--------------------------------------------------------------------------
20+
| DogStatsd Drivers
21+
|--------------------------------------------------------------------------
22+
|
23+
| Here you may configure the DogStatsd instance for your application. These
24+
| configuration values are passed to the DogStatsd instance. You can check
25+
| out https://github.com/DataDog/php-datadogstatsd to see what the different
26+
| configuration values do.
27+
|
28+
| Available Drivers: "single", "batched"
29+
|
30+
*/
31+
32+
'drivers' => [
33+
'single' => [
34+
'host' => null,
35+
'port' => null,
36+
'socket_path' => null,
37+
'global_tags' => null,
38+
39+
'api_key' => null,
40+
'app_key' => null,
41+
'curl_ssl_verify_host' => null,
42+
'curl_ssl_verify_peer' => null,
43+
'datadog_host' => null,
44+
],
45+
'batched' => [
46+
'host' => null,
47+
'port' => null,
48+
'socket_path' => null,
49+
'global_tags' => null,
50+
51+
'api_key' => null,
52+
'app_key' => null,
53+
'curl_ssl_verify_host' => null,
54+
'curl_ssl_verify_peer' => null,
55+
'datadog_host' => null,
56+
],
57+
],
58+
59+
];

src/ServiceProvider.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@
66

77
class ServiceProvider extends BaseServiceProvider
88
{
9+
/**
10+
* Perform post-registration booting of services.
11+
*
12+
* @return void
13+
*/
14+
public function boot()
15+
{
16+
$this->publishes([__DIR__ . '/../config/datadog.php' => config_path('datadog.php')]);
17+
}
18+
919
/**
1020
* Register any package services.
1121
*

0 commit comments

Comments
 (0)