Skip to content

Commit

Permalink
CLOUDTECH-55
Browse files Browse the repository at this point in the history
  • Loading branch information
MsNatali committed Oct 17, 2024
1 parent 281f706 commit 3a1c7a6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
21 changes: 15 additions & 6 deletions config/prometheus.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

return [
'default_bag' => 'default',
'enabled' => env('PROMETHEUS_ENABLED', true),
'enabled' => env('PROMETHEUS_ENABLED', false),
'app_name' => env('PROMETHEUS_APP_NAME', env('APP_NAME')),
'bags' => [
'default' => [
Expand All @@ -12,10 +12,19 @@
'login' => env('PROMETHEUS_AUTH_LOGIN'),
'password' => env('PROMETHEUS_AUTH_PASSWORD'),
],
'connection' => [
'connection' => 'default',
'bag' => 'default',
],
// setup your storage
// 'connection' => [
// 'connection' => 'default',
// 'bag' => 'default',
// ],
// or
// 'apcu-ng' => [
// 'prefix' => 'metrics'
// ],
// or
// 'apcu' => [
// 'prefix' => 'metrics'
// ],
'label_middlewares' => [
// \Ensi\LaravelPrometheus\LabelMiddlewares\AppNameLabelMiddleware::class,
],
Expand All @@ -24,4 +33,4 @@
],
],
],
];
];
8 changes: 8 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,12 @@ protected function getPackageProviders($app): array
PrometheusServiceProvider::class,
];
}

protected function setUp(): void
{
parent::setUp();

config()->set('prometheus.bags.default.connection', ['connection' => 'default', 'bag' => 'default']);
config()->set('prometheus.enabled', true);
}
}

0 comments on commit 3a1c7a6

Please sign in to comment.