Explicitly setting requestId across different Lambda functionsHow to test aws lambda functions locallyAWS Lambda Function Times outSpring rest template with aws x-rayAWS X-Ray shows duplicate nodes in the Service MapAWS Serverless Lambda unencoded characterHow to use my function in Node.js/AWS LambdaMaking a signed IAM_AUTH request for AWS API Gateway w/ PythonRetuning stream in AWS API Gateway -> Lambda function?what should be response of AWS Lambda function, if we need to integrate it with a campaign using Hook?How to chain lambda function calls in X-Ray service map
Could flaps be raised upward to serve as spoilers / lift dumpers?
Need help identifying how to open this bolt/screw
UX writing: When to use "we"?
Partial Fractions: Why does this shortcut method work?
Backpacking with incontinence
Is Norway in the Single Market?
When did J.K. Rowling decide to make Ron and Hermione a couple?
What is the most 'environmentally friendly' way to learn to fly?
How to get maximum number that newcount can hold?
What do the screens say after you are set free?
How is Sword Coast North governed?
How do people drown while wearing a life jacket?
Word to describe someone doing something even though told not to
Accurately recalling the key - can everyone do it?
How does Rust's 128-bit integer `i128` work on a 64-bit system?
In Haskell, when using the XStrict language extension, is if short-circuiting?
Being told my "network" isn't PCI Complaint. I don't even have a server! Do I have to comply?
Why interlaced CRT scanning wasn't done back and forth?
Is the EU really banning "toxic propellants" in 2020? How is that going to work?
Went to a big 4 but got fired for underperformance in a year recently - Now every one thinks I'm pro - How to balance expectations?
Can Otiluke's Freezing Spheres be stockpiled?
What's the term for a group of people who enjoy literary works?
If a Shadow Magic sorcerer casts Darkness using the Eyes of the Dark feature, can they cast another spell that requires concentration?
Is it moral to remove/hide certain parts of a photo, as a photographer?
Explicitly setting requestId across different Lambda functions
How to test aws lambda functions locallyAWS Lambda Function Times outSpring rest template with aws x-rayAWS X-Ray shows duplicate nodes in the Service MapAWS Serverless Lambda unencoded characterHow to use my function in Node.js/AWS LambdaMaking a signed IAM_AUTH request for AWS API Gateway w/ PythonRetuning stream in AWS API Gateway -> Lambda function?what should be response of AWS Lambda function, if we need to integrate it with a campaign using Hook?How to chain lambda function calls in X-Ray service map
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm attempting to build a serverless application using AWS APIGateway/Lambda function integration.
I have the following setup:
* Two APIGateway resources. Calling them service A and service B for now.
* Two Lambda functions which act the the backend, responsible for processing the requests from APIGateway. Calling them LambdaFunction A and LambdaFunction B for now.
ServiceA -> LambdaFunctionA
ServiceB -> LambdaFunctionB
ServiceA->ServiceB
Now, as per the setup serviceA can call ServiceB. I would like to trace a request originating from serviceA to serviceB. One of the ways I was thinking to do this is through requestIds. I was attempting to see if there's some specific way to persist/explicitly provide requestIds when serviceA calls serviceB? I looked up AWS docs and couldn't find any specific mechanism on this.
The other alternative I had was to integration my Lambda functions with Xray and then maybe pass the requestId in the Xray context map/trace. I doubt I'm the first person attempting to trace requests across multiple Lambda functions and thought there would be a mechanism to do this already in place. Any help would be greatly appreciated!
aws-lambda aws-xray
add a comment |
I'm attempting to build a serverless application using AWS APIGateway/Lambda function integration.
I have the following setup:
* Two APIGateway resources. Calling them service A and service B for now.
* Two Lambda functions which act the the backend, responsible for processing the requests from APIGateway. Calling them LambdaFunction A and LambdaFunction B for now.
ServiceA -> LambdaFunctionA
ServiceB -> LambdaFunctionB
ServiceA->ServiceB
Now, as per the setup serviceA can call ServiceB. I would like to trace a request originating from serviceA to serviceB. One of the ways I was thinking to do this is through requestIds. I was attempting to see if there's some specific way to persist/explicitly provide requestIds when serviceA calls serviceB? I looked up AWS docs and couldn't find any specific mechanism on this.
The other alternative I had was to integration my Lambda functions with Xray and then maybe pass the requestId in the Xray context map/trace. I doubt I'm the first person attempting to trace requests across multiple Lambda functions and thought there would be a mechanism to do this already in place. Any help would be greatly appreciated!
aws-lambda aws-xray
have you looked into step functions? I'd image they provide exactly what you want, tracing the steps calling each lambda function
– Gaz_Edge
Mar 27 at 8:34
add a comment |
I'm attempting to build a serverless application using AWS APIGateway/Lambda function integration.
I have the following setup:
* Two APIGateway resources. Calling them service A and service B for now.
* Two Lambda functions which act the the backend, responsible for processing the requests from APIGateway. Calling them LambdaFunction A and LambdaFunction B for now.
ServiceA -> LambdaFunctionA
ServiceB -> LambdaFunctionB
ServiceA->ServiceB
Now, as per the setup serviceA can call ServiceB. I would like to trace a request originating from serviceA to serviceB. One of the ways I was thinking to do this is through requestIds. I was attempting to see if there's some specific way to persist/explicitly provide requestIds when serviceA calls serviceB? I looked up AWS docs and couldn't find any specific mechanism on this.
The other alternative I had was to integration my Lambda functions with Xray and then maybe pass the requestId in the Xray context map/trace. I doubt I'm the first person attempting to trace requests across multiple Lambda functions and thought there would be a mechanism to do this already in place. Any help would be greatly appreciated!
aws-lambda aws-xray
I'm attempting to build a serverless application using AWS APIGateway/Lambda function integration.
I have the following setup:
* Two APIGateway resources. Calling them service A and service B for now.
* Two Lambda functions which act the the backend, responsible for processing the requests from APIGateway. Calling them LambdaFunction A and LambdaFunction B for now.
ServiceA -> LambdaFunctionA
ServiceB -> LambdaFunctionB
ServiceA->ServiceB
Now, as per the setup serviceA can call ServiceB. I would like to trace a request originating from serviceA to serviceB. One of the ways I was thinking to do this is through requestIds. I was attempting to see if there's some specific way to persist/explicitly provide requestIds when serviceA calls serviceB? I looked up AWS docs and couldn't find any specific mechanism on this.
The other alternative I had was to integration my Lambda functions with Xray and then maybe pass the requestId in the Xray context map/trace. I doubt I'm the first person attempting to trace requests across multiple Lambda functions and thought there would be a mechanism to do this already in place. Any help would be greatly appreciated!
aws-lambda aws-xray
aws-lambda aws-xray
asked Mar 27 at 0:34
chrisrhyno2003chrisrhyno2003
1,4573 gold badges21 silver badges52 bronze badges
1,4573 gold badges21 silver badges52 bronze badges
have you looked into step functions? I'd image they provide exactly what you want, tracing the steps calling each lambda function
– Gaz_Edge
Mar 27 at 8:34
add a comment |
have you looked into step functions? I'd image they provide exactly what you want, tracing the steps calling each lambda function
– Gaz_Edge
Mar 27 at 8:34
have you looked into step functions? I'd image they provide exactly what you want, tracing the steps calling each lambda function
– Gaz_Edge
Mar 27 at 8:34
have you looked into step functions? I'd image they provide exactly what you want, tracing the steps calling each lambda function
– Gaz_Edge
Mar 27 at 8:34
add a comment |
1 Answer
1
active
oldest
votes
AWS X-Ray already uses trace ids that are used for context propagation across two resources in your case servicea and serviceb. For API Gateway and Lambda the context propagation for trace id is automatic if you have X-Ray enabled on your entry point api gateway or lambda. A trace id generated for you by the X-Ray SDK in API Gateway or lambda is used to uniquely identify a request. If you have a custom request id you can additionally add it to the X-Ray segments as annotations.
Thank you for your answer. In terms of tracing logs, I'm not sure if X-Ray trace IDs can be correlated to requestIds/or some sort of an identifier in CloudWatch logs. Do you have any recommendations there?
– chrisrhyno2003
Mar 27 at 15:06
I think the trace id should appear in cloudwatch logs for your lambda function execution. You can additionally put a custom request id if you wish in your annotation.
– Rohit Banga
Mar 27 at 15:48
Oh I see. I wasn't aware of the Xray trace Ids being printed in CloudWatch logs for my Lambda function execution. Thanks for the heads up. I'll look into that.
– chrisrhyno2003
Mar 27 at 15:58
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55368130%2fexplicitly-setting-requestid-across-different-lambda-functions%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
AWS X-Ray already uses trace ids that are used for context propagation across two resources in your case servicea and serviceb. For API Gateway and Lambda the context propagation for trace id is automatic if you have X-Ray enabled on your entry point api gateway or lambda. A trace id generated for you by the X-Ray SDK in API Gateway or lambda is used to uniquely identify a request. If you have a custom request id you can additionally add it to the X-Ray segments as annotations.
Thank you for your answer. In terms of tracing logs, I'm not sure if X-Ray trace IDs can be correlated to requestIds/or some sort of an identifier in CloudWatch logs. Do you have any recommendations there?
– chrisrhyno2003
Mar 27 at 15:06
I think the trace id should appear in cloudwatch logs for your lambda function execution. You can additionally put a custom request id if you wish in your annotation.
– Rohit Banga
Mar 27 at 15:48
Oh I see. I wasn't aware of the Xray trace Ids being printed in CloudWatch logs for my Lambda function execution. Thanks for the heads up. I'll look into that.
– chrisrhyno2003
Mar 27 at 15:58
add a comment |
AWS X-Ray already uses trace ids that are used for context propagation across two resources in your case servicea and serviceb. For API Gateway and Lambda the context propagation for trace id is automatic if you have X-Ray enabled on your entry point api gateway or lambda. A trace id generated for you by the X-Ray SDK in API Gateway or lambda is used to uniquely identify a request. If you have a custom request id you can additionally add it to the X-Ray segments as annotations.
Thank you for your answer. In terms of tracing logs, I'm not sure if X-Ray trace IDs can be correlated to requestIds/or some sort of an identifier in CloudWatch logs. Do you have any recommendations there?
– chrisrhyno2003
Mar 27 at 15:06
I think the trace id should appear in cloudwatch logs for your lambda function execution. You can additionally put a custom request id if you wish in your annotation.
– Rohit Banga
Mar 27 at 15:48
Oh I see. I wasn't aware of the Xray trace Ids being printed in CloudWatch logs for my Lambda function execution. Thanks for the heads up. I'll look into that.
– chrisrhyno2003
Mar 27 at 15:58
add a comment |
AWS X-Ray already uses trace ids that are used for context propagation across two resources in your case servicea and serviceb. For API Gateway and Lambda the context propagation for trace id is automatic if you have X-Ray enabled on your entry point api gateway or lambda. A trace id generated for you by the X-Ray SDK in API Gateway or lambda is used to uniquely identify a request. If you have a custom request id you can additionally add it to the X-Ray segments as annotations.
AWS X-Ray already uses trace ids that are used for context propagation across two resources in your case servicea and serviceb. For API Gateway and Lambda the context propagation for trace id is automatic if you have X-Ray enabled on your entry point api gateway or lambda. A trace id generated for you by the X-Ray SDK in API Gateway or lambda is used to uniquely identify a request. If you have a custom request id you can additionally add it to the X-Ray segments as annotations.
answered Mar 27 at 14:37
Rohit BangaRohit Banga
10.9k23 gold badges89 silver badges169 bronze badges
10.9k23 gold badges89 silver badges169 bronze badges
Thank you for your answer. In terms of tracing logs, I'm not sure if X-Ray trace IDs can be correlated to requestIds/or some sort of an identifier in CloudWatch logs. Do you have any recommendations there?
– chrisrhyno2003
Mar 27 at 15:06
I think the trace id should appear in cloudwatch logs for your lambda function execution. You can additionally put a custom request id if you wish in your annotation.
– Rohit Banga
Mar 27 at 15:48
Oh I see. I wasn't aware of the Xray trace Ids being printed in CloudWatch logs for my Lambda function execution. Thanks for the heads up. I'll look into that.
– chrisrhyno2003
Mar 27 at 15:58
add a comment |
Thank you for your answer. In terms of tracing logs, I'm not sure if X-Ray trace IDs can be correlated to requestIds/or some sort of an identifier in CloudWatch logs. Do you have any recommendations there?
– chrisrhyno2003
Mar 27 at 15:06
I think the trace id should appear in cloudwatch logs for your lambda function execution. You can additionally put a custom request id if you wish in your annotation.
– Rohit Banga
Mar 27 at 15:48
Oh I see. I wasn't aware of the Xray trace Ids being printed in CloudWatch logs for my Lambda function execution. Thanks for the heads up. I'll look into that.
– chrisrhyno2003
Mar 27 at 15:58
Thank you for your answer. In terms of tracing logs, I'm not sure if X-Ray trace IDs can be correlated to requestIds/or some sort of an identifier in CloudWatch logs. Do you have any recommendations there?
– chrisrhyno2003
Mar 27 at 15:06
Thank you for your answer. In terms of tracing logs, I'm not sure if X-Ray trace IDs can be correlated to requestIds/or some sort of an identifier in CloudWatch logs. Do you have any recommendations there?
– chrisrhyno2003
Mar 27 at 15:06
I think the trace id should appear in cloudwatch logs for your lambda function execution. You can additionally put a custom request id if you wish in your annotation.
– Rohit Banga
Mar 27 at 15:48
I think the trace id should appear in cloudwatch logs for your lambda function execution. You can additionally put a custom request id if you wish in your annotation.
– Rohit Banga
Mar 27 at 15:48
Oh I see. I wasn't aware of the Xray trace Ids being printed in CloudWatch logs for my Lambda function execution. Thanks for the heads up. I'll look into that.
– chrisrhyno2003
Mar 27 at 15:58
Oh I see. I wasn't aware of the Xray trace Ids being printed in CloudWatch logs for my Lambda function execution. Thanks for the heads up. I'll look into that.
– chrisrhyno2003
Mar 27 at 15:58
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55368130%2fexplicitly-setting-requestid-across-different-lambda-functions%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
have you looked into step functions? I'd image they provide exactly what you want, tracing the steps calling each lambda function
– Gaz_Edge
Mar 27 at 8:34