Napp / xray-laravel

AWS X-Ray tracing for Laravel apps
MIT License
56 stars 34 forks source link

Argument #1 ($host) must be of type string, null given #41

Open saugat86 opened 1 year ago

saugat86 commented 1 year ago
\Xray\Submission\DaemonSegmentSubmitter::__construct(): Argument #1 ($host) must be of type string, null given, called in /vendor/napp/xray-laravel/src/Submission/DaemonSegmentSubmitter.php on line 44

I gave the hostname and port of the X-Ray daemon from two environment variables, _AWS_XRAY_DAEMON_ADDRESS and _AWS_XRAY_DAEMON_PORT respectively before passing them to this library as well. I gave the env variables as

....
XRAY_ENABLED=true
_AWS_XRAY_DAEMON_ADDRESS="127.0.0.1"
_AWS_XRAY_DAEMON_PORT=2000
....
vsiqueira commented 1 month ago

Wouldn't be a better option to have these attributes defined in the config file ?