-
Notifications
You must be signed in to change notification settings - Fork 63
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
Reading the AWS Request ID #145
Comments
Yes: laravel-bridge/config/bref.php Line 31 in 2bff7e6
|
Hmm, alright, I have to be more specific I guess: at this point I am not getting the I'm logging all headers coming in to my controller via the request, but it's not there. |
I am having the same problem. @harmenjanssen can you reopen the issue as ATM it's not clear how to use this config option :/ |
Does your request object not have the |
Nope, it does not. |
Mhhh, turns out my apps aren't actually using this anymore. @georgeboot Do we have any way to access the AWS request id? |
Afk atm, but there should be a $_SERVER var called HTTP_X_REQUEST_ID I believe |
As @georgeboot said, I had a look into $_SERVER and found out that $_SERVER['LAMBDA_INVOCATION_CONTEXT'] has necessary info: $requestId = null;
if (isset($_SERVER['LAMBDA_INVOCATION_CONTEXT'])) {
$lambdaContext = json_decode($_SERVER['LAMBDA_INVOCATION_CONTEXT']);
$requestId = $lambdaContext?->awsRequestId;
} |
I feel like we should expose the invocation context a little better, maybe even attach some of the data to the |
Hi,
I was wondering if it's possible to get at the original Lambda Request ID within your Laravel app?
I found the Context class which has a reference to the ID, but I'm unsure if that's accessible from within my Laravel app. (tried dependency-injecting it, but that was not the answer)
Thanks a lot in advance!
The text was updated successfully, but these errors were encountered: