Skip to content

Commit 1b307d2

Browse files
committed
docs(tracer): add initial image, requirements
1 parent 931de51 commit 1b307d2

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

docs/quickstart.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,13 @@ It's a [two-step process](https://docs.aws.amazon.com/lambda/latest/dg/services-
606606
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/"
607607
```
608608

609+
=== "requirements.txt"
610+
611+
```bash
612+
aws-lambda-powertools
613+
aws-xray-sdk
614+
```
615+
609616
Let's break it down:
610617

611618
* **L1**: First, we import AWS X-Ray SDK. `xray_recorder` records blocks of code being traced ([subsegment](https://docs.aws.amazon.com/xray/latest/devguide/xray-concepts.html#xray-concepts-subsegments){target="_blank"}). It also sends generated traces to the AWS X-Ray daemon running in the Lambda service who subsequently forwards them to AWS X-Ray service
@@ -620,11 +627,9 @@ We've made the following changes in `template.yaml` for this to work seamless:
620627
* **L7-8**: Enables tracing for Amazon API Gateway
621628
* **L14**: Enables tracing for our Serverless Function. This will also add a managed IAM Policy named [AWSXRayDaemonWriteAccess](https://console.aws.amazon.com/iam/home#/policies/arn:aws:iam::aws:policy/AWSXRayDaemonWriteAccess){target="_blank"} to allow Lambda to send traces to AWS X-Ray.
622629

623-
!!! danger "TODO: Revisit to see if it's still necessary"
624-
625-
!!! Info
626-
Want to know more about context managers and understand the benefits of using them? Follow [article](https://realpython.com/python-with-statement/) from Real Python.
630+
You can now build and deploy our updates with `sam build && sam deploy`. Once deployed, try invoking the application via the API endpoint, then you should see the following result within the [AWS X-Ray Console](https://console.aws.amazon.com/xray/home#/traces/){target="_blank"}.
627631

632+
![AWS X-Ray Console trace view](./media/tracer_xray_sdk_showcase.png)
628633

629634
### Enriching our generates traces
630635

0 commit comments

Comments
 (0)