Skip to content

Add daemon configuration to the xray config file #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions config/xray.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,14 @@
'expires' => '',
],
],

/*
|--------------------------------------------------------------------------
| Daemon, only needed if "DaemonSegmentSubmitter" submitter is chosen
|--------------------------------------------------------------------------
*/
'daemon' => [
'address' => env('_AWS_XRAY_DAEMON_ADDRESS', '127.0.0.1'),
'port' => env('_AWS_XRAY_DAEMON_PORT', '2000'),
],
];
6 changes: 3 additions & 3 deletions src/Submission/DaemonSegmentSubmitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class DaemonSegmentSubmitter implements SegmentSubmitter

public function __construct()
{
$this->host = env('_AWS_XRAY_DAEMON_ADDRESS');
$this->port = (int) env('_AWS_XRAY_DAEMON_PORT');
$this->host = config('xray.daemon.address');
$this->port = (int) config('xray.daemon.port');
}

/**
Expand All @@ -49,7 +49,7 @@ protected function submitter(): SubmissionDaemonSegmentSubmitter
}

/**
* @param Segment $segment
* @param Segment $segment
* @return void
*/
public function submitSegment(Segment $segment)
Expand Down