remove mergeConfigs

This commit is contained in:
Daniil Zobov 2020-04-14 16:30:08 +03:00
parent eff4294d5a
commit 0806d177e6

View file

@ -15,7 +15,6 @@ class PrometheusServiceProvider extends ServiceProvider
public function boot()
{
$this->publishFiles();
$this->mergeConfigs();
$this->loadRoutes();
if (config('prometheus.metrics_route_enabled')) {
@ -29,14 +28,6 @@ class PrometheusServiceProvider extends ServiceProvider
}
}
/**
* Merge configs.
*/
protected function mergeConfigs()
{
$this->mergeConfigFrom(__DIR__ . '/../config/prometheus.php', 'prometheus');
}
/**
* Publish files.
*/
@ -60,6 +51,8 @@ class PrometheusServiceProvider extends ServiceProvider
*/
public function register()
{
$this->mergeConfigFrom(__DIR__ . '/../config/prometheus.php', 'prometheus');
$this->app->singleton(PrometheusExporter::class, function ($app) {
$adapter = $app['prometheus.storage_adapter'];
$prometheus = new CollectorRegistry($adapter);