Napp / xray-laravel

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

Doesn't work with Vapor? #52

Open msnegurski opened 7 months ago

msnegurski commented 7 months ago

Hey, curious if anyone encountered this issue. It just straight up doesn't work with Vapor. From doing some digging issue seems to be that HTTP_X_AMZN_TRACE_ID and LAMBDA_INVOCATION_CONTEXT variable are not present in either $_SERVER or $_ENV.

msnegurski commented 7 months ago

Xray is enabled and configured and general traces are present. But anything that happens inside Laravel app is absent. Here is a screenshot as example.

CleanShot 2024-04-21 at 11 49 52@2x

emaadali commented 7 months ago

@msnegurski Were you able to figure this out?

msnegurski commented 6 months ago

@emaadali unfortunately not, basically gave up on this idea

I made some custom trace id generation and got it working somewhat, however that means traces from Laravel will not be linked to traces automatically generated by Lambda (from screenshot)

yani- commented 4 months ago

Yes, it supports vapor out of the box. You have to configure the submitter in config/xray.php to:

    'submitter' => \Napp\Xray\Submission\DaemonSegmentSubmitter::class,
phadaphunk commented 3 months ago

Anyone made it work? Or is this dead. I can only see lambda invocations and http response codes but nothing else is being logged even though I followed the doc for vapor.