Tracing a Serverless Application
Recap.dev provides two levels of tracing: basic tracing and function-level tracing
Basic tracing collects request, response and error information, logs and provides a timeline of external resource access (databases, http endpoints, external services) of your unit (basically, endpoint or handler).
Function-level tracing also adds timings of the individual function calls to the timeline.
#
Setting up a Basic TracingRecap.dev currently supports tracing of Serverless Framework out of the box. It's also easy to setup tracing for applications not using Serverless Framework.
#
Serverless FrameworkTo use recap.dev with the Serverless Framework all you need to do is to add recap.dev serverless plugin and configure it.
#
1. Install recap.dev serverless pluginor
#
2. Install recap.dev client libraryor
#
3. Add recap.dev plugin to your serverless.ymlPlease note that recap.dev plugin should be the first plugin in the list.
RECAP_DEV_SYNC_ENDPOINT
environment variable#
4. Add It should point to your recap.dev server installation.
After doing this and redeploying you should start getting tracing data with basic details.
Check out an example project here.
#
Applications Not Using Serverless FrameworkAlmost any serverless application can be easily traced with recap.dev even when not using Serverless Framework.
#
1. Install recap.dev client libraryor
#
2. Wrap Your Handler Function with Recap.DevUse wrapLambdaHandler
exported from the @recap.dev/client
package like this:
RECAP_DEV_SYNC_ENDPOINT
environment variable#
3. Add It should point to your recap.dev server installation.
#
Setting up a Function-level TracingClick here to learn how to set up the function-level tracing for your application.