Tracing Lambda functions can be done in three methods:
- Auto-tracing through the Epsagon dashboard.
- Using the
serverless-plugin-epsagon
if you're using The Serverless Framework. - Calling the SDK.
Make sure to choose just one of the methods
Calling the SDK is simple, wrap your handler function with the epsagon.lambda_wrapper
decorator.
For example:
import epsagon
epsagon.init(
token='<epsagon-token>',
app_name='<app-name-stage>',
metadata_only=False,
)
# Wrap your entry point:
@epsagon.lambda_wrapper
def handle(event, context):
# Your code is here
Updated 3 months ago