From e7df3dbb4fa9df4b71984534a893c76af6ac89df Mon Sep 17 00:00:00 2001 From: James Fuller Date: Thu, 18 Oct 2018 12:14:53 -0400 Subject: [PATCH] pass environment filter config to agent --- config/elastic-apm.php | 6 ++++++ src/Providers/ElasticApmServiceProvider.php | 1 + 2 files changed, 7 insertions(+) diff --git a/config/elastic-apm.php b/config/elastic-apm.php index 6b9dcaf..257ea90 100644 --- a/config/elastic-apm.php +++ b/config/elastic-apm.php @@ -12,6 +12,12 @@ 'appVersion' => '', ], + 'env' => [ + // whitelist environment variables OR send everything + 'env' => ['DOCUMENT_ROOT', 'REMOTE_ADDR'] + //'env' => [] + ], + 'server' => [ // The apm-server to connect to 'serverUrl' => 'http://127.0.0.1:8200', diff --git a/src/Providers/ElasticApmServiceProvider.php b/src/Providers/ElasticApmServiceProvider.php index ce7ee19..2ba3cb9 100644 --- a/src/Providers/ElasticApmServiceProvider.php +++ b/src/Providers/ElasticApmServiceProvider.php @@ -45,6 +45,7 @@ public function register() 'frameworkVersion' => app()->version(), ], config('elastic-apm.app'), + config('elastic-apm.env'), config('elastic-apm.server') ) );