Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
Merge pull request #38 from philkra/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
philkra authored Feb 28, 2019
2 parents 8879fbc + 9b99c03 commit e5d93e0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
2019-02-27 (5.7.6) mpetrunic
* Fix Lumen compatibility issues

2019-02-22 (5.7.5) dstepe
* Start CHANGELOG
* Replace use of LARAVEL_START constant with REQUEST_TIME_FLOAT server var
* Replace transaction duration with PhilKra\Helper\Timer
* Require philkra/elastic-apm-php-agent >=6.5.3 for Timer feature
2 changes: 1 addition & 1 deletion src/Middleware/RecordTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ protected function getTransactionName(\Illuminate\Http\Request $request): string
*/
protected function getRouteUriTransactionName(\Illuminate\Http\Request $request): string
{
$path = ($request->route()->uri === '/') ? '' : $request->route()->uri;
$path = ($request->path() === '/') ? '' : $request->path();

return sprintf(
"%s /%s",
Expand Down
13 changes: 9 additions & 4 deletions src/Providers/ElasticApmServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class ElasticApmServiceProvider extends ServiceProvider
private $startTime;
/** @var Timer */
private $timer;
/** @var string */
private $sourceConfigPath = __DIR__ . '/../../config/elastic-apm.php';

/**
* Bootstrap the application services.
Expand All @@ -23,9 +25,11 @@ class ElasticApmServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->publishes([
__DIR__ . '/../../config/elastic-apm.php' => config_path('elastic-apm.php'),
], 'config');
if (class_exists('Illuminate\Foundation\Application', false)) {
$this->publishes([
realpath($this->sourceConfigPath) => config_path('elastic-apm.php'),
], 'config');
}

if (config('elastic-apm.active') === true && config('elastic-apm.spans.querylog.enabled') !== false) {
$this->listenForQueries();
Expand All @@ -39,8 +43,9 @@ public function boot()
*/
public function register()
{

$this->mergeConfigFrom(
__DIR__ . '/../../config/elastic-apm.php',
realpath($this->sourceConfigPath),
'elastic-apm'
);

Expand Down

0 comments on commit e5d93e0

Please sign in to comment.