You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -4,78 +4,130 @@ Powertools for AWS Lambda (TypeScript) is a developer toolkit to implement Serve
4
4
5
5
You can use the library in both TypeScript and JavaScript code bases.
6
6
7
-
> Also available in [Python](https://github.com/aws-powertools/powertools-lambda-python), [Java](https://github.com/aws-powertools/powertools-lambda-java), and [.NET](https://github.com/aws-powertools/powertools-lambda-dotnet).
-[Add metadata and annotations](#add-metadata-and-annotations)
18
12
-[Contribute](#contribute)
19
13
-[Roadmap](#roadmap)
20
14
-[Connect](#connect)
21
15
-[How to support Powertools for AWS Lambda (TypeScript)?](#how-to-support-powertools-for-aws-lambda-typescript)
22
16
-[Becoming a reference customer](#becoming-a-reference-customer)
23
17
-[Sharing your work](#sharing-your-work)
24
18
-[Using Lambda Layer](#using-lambda-layer)
25
-
-[Credits](#credits)
26
19
-[License](#license)
27
20
28
-
## Features
21
+
## Intro
22
+
23
+
The Tracer utility is an opinionated thin wrapper for [AWS X-Ray SDK for Node.js](https://github.com/aws/aws-xray-sdk-node), to automatically capture cold starts, trace HTTP(S) clients including `fetch` and generate segments and add metadata or annotations to traces.
24
+
25
+
## Usage
26
+
27
+
To get started, install the library by running:
28
+
29
+
```sh
30
+
npm i @aws-lambda-powertools/tracer
31
+
```
32
+
33
+
### Basic usage
34
+
35
+
Add `Tracer` to your Lambda handler as decorator:
29
36
30
-
-**[Tracer](https://docs.powertools.aws.dev/lambda/typescript/latest/core/tracer/)** - Utilities to trace Lambda function handlers, and both synchronous and asynchronous functions
31
-
-**[Logger](https://docs.powertools.aws.dev/lambda/typescript/latest/core/logger/)** - Structured logging made easier, and a middleware to enrich log items with key details of the Lambda context
32
-
-**[Metrics](https://docs.powertools.aws.dev/lambda/typescript/latest/core/metrics/)** - Custom Metrics created asynchronously via CloudWatch Embedded Metric Format (EMF)
33
-
-**[Parameters](https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parameters/)** - High-level functions to retrieve one or more parameters from AWS SSM, Secrets Manager, AppConfig, and DynamoDB
The Powertools for AWS Lambda (TypeScript) utilities follow a modular approach, similar to the official [AWS SDK v3 for JavaScript](https://github.com/aws/aws-sdk-js-v3).
42
-
Each TypeScript utility is installed as standalone NPM package.
You can find examples of how to use Powertools for AWS Lambda (TypeScript) in the [examples](https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/examples/app) directory. The application is a simple REST API that can be deployed via either AWS CDK or AWS SAM.
The [Serverless TypeScript Demo](https://github.com/aws-samples/serverless-typescript-demo) shows how to use Powertools for AWS Lambda (TypeScript).
67
-
You can find instructions on how to deploy and load test this application in the [repository](https://github.com/aws-samples/serverless-typescript-demo).
109
+
tracer.putMetadata('paymentResponse', {
110
+
foo: 'bar',
111
+
});
112
+
tracer.putAnnotation('successfulBooking', true);
68
113
69
-
The [AWS Lambda performance tuning](https://github.com/aws-samples/optimizations-for-lambda-functions) repository also uses Powertools for AWS Lambda (TypeScript) as well as demonstrating other performance tuning techniques for Lambda functions written in TypeScript.
If you are interested in contributing to this project, please refer to our [Contributing Guidelines](https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/CONTRIBUTING.md).
121
+
If you are interested in contributing to this project, please refer to
The roadmap of Powertools for AWS Lambda (TypeScript) is driven by customers’ demand.
78
-
Help us prioritize upcoming functionalities or utilities by [upvoting existing RFCs and feature requests](https://github.com/aws-powertools/powertools-lambda-typescript/issues), or [creating new ones](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose), in this GitHub repository.
127
+
Help us prioritize upcoming functionalities or utilities
128
+
by [upvoting existing RFCs and feature requests](https://github.com/aws-powertools/powertools-lambda-typescript/issues),
129
+
or [creating new ones](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new/choose), in this GitHub
130
+
repository.
79
131
80
132
## Connect
81
133
@@ -86,7 +138,10 @@ Help us prioritize upcoming functionalities or utilities by [upvoting existing R
86
138
87
139
### Becoming a reference customer
88
140
89
-
Knowing which companies are using this library is important to help prioritize the project internally. If your company is using Powertools for AWS Lambda (TypeScript), you can request to have your name and logo added to the README file by raising a [Support Powertools for AWS Lambda (TypeScript) (become a reference)](https://github.com/aws-powertools/powertools-lambda-typescript/issues/new?assignees=&labels=customer-reference&template=support_powertools.yml&title=%5BSupport+Lambda+Powertools%5D%3A+%3Cyour+organization+name%3E) issue.
141
+
Knowing which companies are using this library is important to help prioritize the project internally. If your company
142
+
is using Powertools for AWS Lambda (TypeScript), you can request to have your name and logo added to the README file by
143
+
raising a [Support Powertools for AWS Lambda (TypeScript) (become a reference)](https://s12d.com/become-reference-pt-ts)
144
+
issue.
90
145
91
146
The following companies, among others, use Powertools:
92
147
@@ -108,15 +163,16 @@ The following companies, among others, use Powertools:
108
163
109
164
### Sharing your work
110
165
111
-
Share what you did with Powertools for AWS Lambda (TypeScript) 💞💞. Blog post, workshops, presentation, sample apps and others. Check out what the community has already shared about Powertools for AWS Lambda (TypeScript) [here](https://docs.powertools.aws.dev/lambda/typescript/latest/we_made_this).
166
+
Share what you did with Powertools for AWS Lambda (TypeScript) 💞💞. Blog post, workshops, presentation, sample apps and
167
+
others. Check out what the community has already shared about Powertools for AWS Lambda (
This helps us understand who uses Powertools for AWS Lambda (TypeScript) in a non-intrusive way, and helps us gain future investments for other Powertools for AWS Lambda languages. When [using Layers](#lambda-layers), you can add Powertools for AWS Lambda (TypeScript) as a dev dependency (or as part of your virtual env) to not impact the development process.
116
-
117
-
## Credits
118
-
119
-
Credits for the Powertools for AWS Lambda (TypeScript) idea go to [DAZN](https://github.com/getndazn) and their [DAZN Lambda Powertools](https://github.com/getndazn/dazn-lambda-powertools/).
172
+
This helps us understand who uses Powertools for AWS Lambda (TypeScript) in a non-intrusive way, and helps us gain
173
+
future investments for other Powertools for AWS Lambda languages.
174
+
When [using Layers](https://docs.powertools.aws.dev/lambda/typescript/latest/#lambda-layer), you can add Powertools as a
175
+
dev dependency to not impact the development process.
0 commit comments