Lambda X-Ray Tracing
| Key | Value |
|---|---|
| Services | Lambda, X-Ray, CloudFormation |
| Integrations | AWS CLI, AWS SAM |
| Categories | Serverless; Observability |
Introduction
A collection of samples demonstrating AWS X-Ray distributed tracing for Lambda functions using LocalStack. The samples show how to instrument Python Lambda functions with the AWS X-Ray SDK and AWS Powertools Tracer, and how to retrieve and inspect trace data locally.
Sub-samples
| Sample | Description |
|---|---|
| python-xray-sdk | Lambda X-Ray tracing using the AWS X-Ray SDK for Python |
| python-powertools | Lambda X-Ray tracing using AWS Powertools Tracer |
Prerequisites
- A valid LocalStack for AWS license. Your license provides a
LOCALSTACK_AUTH_TOKENto activate LocalStack. - Docker
localstackCLIawslocalCLI- Python 3 with
pip
Start LocalStack
export LOCALSTACK_AUTH_TOKEN=<your-auth-token> localstack start -d
Refer to the individual sub-sample READMEs for deployment and invocation instructions.
License
This code is available under the Apache 2.0 license.