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
@@ -20,9 +20,11 @@ Lambda Powertools provides three core utilities:
20
20
21
21
***[Tracing](https://awslabs.github.io/aws-lambda-powertools-dotnet/core/tracing/)** - provides a simple way to send traces from functions to AWS X-Ray to provide visibility into function calls, interactions with other AWS services, or external HTTP requests. Annotations can easily be added to traces to allow filtering traces based on key information. For example, when using Tracer, a ColdStart annotation is created for you so you can easily group and analyze traces where there was an initialization overhead.
22
22
23
+
***[Parameters (developer preview)](https://awslabs.github.io/aws-lambda-powertools-dotnet/core/parameters/)** - provides high-level functionality to retrieve one or multiple parameter values from [AWS Systems Manager Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html){target="_blank"}, [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/){target="_blank"}, or [Amazon DynamoDB](https://aws.amazon.com/dynamodb/){target="_blank"}. We also provide extensibility to bring your own providers.
24
+
23
25
### Installation
24
26
25
-
The AWS Lambda Powertools for .NET utilities (.NET 6) are available as NuGet packages. You can install the packages from the NuGet gallery or from within the Visual Studio IDE. Search `AWS.Lambda.Powertools*` to see various utilities available. Powertools is available on NuGet.
27
+
The AWS Lambda Powertools for .NET utilities (.NET 6) are available as NuGet packages. You can install the packages from [NuGet Gallery](https://www.nuget.org/packages?q=AWS+Lambda+Powertools*){target="_blank"} or from Visual Studio editor by searching `AWS.Lambda.Powertools*` to see various utilities available.
We have provided examples focused specifically on each of the utilities. Each solution comes with an AWS Serverless Application Model (AWS SAM) templates to run your functions as a Zip package using the AWS Lambda .NET 6 managed runtime; or as a container package using the AWS base images for .NET.
@@ -66,7 +72,7 @@ We welcome contributions from developers of all levels to our open-source projec
66
72
## Connect
67
73
68
74
***AWS Lambda Powertools on Discord**: `#dotnet` - **[Invite link](https://discord.gg/B8zZKbbyET)**
Copy file name to clipboardExpand all lines: docs/core/logging.md
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,14 @@ The logging utility provides a Lambda optimized logger with output structured as
12
12
* Log sampling enables DEBUG log level for a percentage of requests (disabled by default)
13
13
* Append additional keys to structured log at any point in time
14
14
15
+
## Installation
16
+
17
+
Powertools are available as NuGet packages. You can install the packages from [NuGet Gallery](https://www.nuget.org/packages?q=AWS+Lambda+Powertools*){target="_blank"} or from Visual Studio editor by searching `AWS.Lambda.Powertools*` to see various utilities available.
Copy file name to clipboardExpand all lines: docs/core/metrics.md
+27-1Lines changed: 27 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ These metrics can be visualized through [Amazon CloudWatch Console](https://aws.
9
9
10
10
## Key features
11
11
12
-
* Aggregate up to 100 metrics using a single CloudWatch EMF object (large JSON blob)
12
+
* Aggregate up to 100 metrics using a single [CloudWatch EMF](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_Specification.html){target="_blank"} object (large JSON blob)
13
13
* Validating your metrics against common metric definitions mistakes (for example, metric unit, values, max dimensions, max metrics)
14
14
* Metrics are created asynchronously by the CloudWatch service. You do not need any custom stacks, and there is no impact to Lambda function latency
15
15
* Context manager to create a one off metric with a different dimension
@@ -21,6 +21,14 @@ These metrics can be visualized through [Amazon CloudWatch Console](https://aws.
Powertools are available as NuGet packages. You can install the packages from [NuGet Gallery](https://www.nuget.org/packages?q=AWS+Lambda+Powertools*){target="_blank"} or from Visual Studio editor by searching `AWS.Lambda.Powertools*` to see various utilities available.
If you're new to Amazon CloudWatch, there are two terminologies you must be aware of before using this utility:
@@ -378,3 +386,21 @@ CloudWatch EMF uses the same dimensions across all your metrics. Use **`PushSing
378
386
});
379
387
...
380
388
```
389
+
390
+
## Testing your code
391
+
392
+
### Environment variables
393
+
394
+
???+ tip
395
+
Ignore this section, if:
396
+
397
+
* You are explicitly setting namespace/default dimension via `namespace` and `service` parameters
398
+
* You're not instantiating `Metrics` in the global namespace
399
+
400
+
For example, `Metrics(namespace="ExampleApplication", service="booking")`
401
+
402
+
Make sure to set `POWERTOOLS_METRICS_NAMESPACE` and `POWERTOOLS_SERVICE_NAME` before running your tests to prevent failing on `SchemaValidation` exception. You can set it before you run tests by adding the environment variable.
403
+
404
+
```csharp title="Injecting Metric Namespace before running tests"
Copy file name to clipboardExpand all lines: docs/core/tracing.md
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,20 @@ a provides functionality to reduce the overhead of performing common tracing tas
10
10
11
11
## Key Features
12
12
13
-
* Helper methods to improve the developer experience for creating [custom AWS X-Ray subsegments](https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-dotnet-subsegments.html).
13
+
* Helper methods to improve the developer experience for creating [custom AWS X-Ray subsegments](https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-dotnet-subsegments.html){target=blank}.
14
14
* Capture cold start as annotation.
15
15
* Capture function responses and full exceptions as metadata.
16
16
* Better experience when developing with multiple threads.
17
17
* Auto-patch supported modules by AWS X-Ray
18
18
19
+
## Installation
20
+
21
+
Powertools are available as NuGet packages. You can install the packages from [NuGet Gallery](https://www.nuget.org/packages?q=AWS+Lambda+Powertools*){target="_blank"} or from Visual Studio editor by searching `AWS.Lambda.Powertools*` to see various utilities available.
Before you use this utility, your AWS Lambda function [must have permissions](https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html#services-xray-permissions) to send traces to AWS X-Ray.
Copy file name to clipboardExpand all lines: docs/utilities/parameters.md
+25-24Lines changed: 25 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -3,19 +3,22 @@ title: Parameters
3
3
description: Utility
4
4
---
5
5
6
+
???+ warning
7
+
**This utility is currently in developer preview** and is intended strictly for feedback and testing purposes **and not for production workloads**. The version and all future versions tagged with the `-preview` suffix should be treated as not stable. Until this utility is [General Availability](https://github.com/awslabs/aws-lambda-powertools-dotnet/milestone/2) we may introduce significant breaking changes and improvements in response to customers feedback.
8
+
6
9
<!-- markdownlint-disable MD013 -->
7
-
The parameters utility provides high-level functions to retrieve one or multiple parameter values from [AWS Systems Manager Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html){target="_blank"}, [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/){target="_blank"}, [Amazon DynamoDB](https://aws.amazon.com/dynamodb/){target="_blank"}, or bring your own.
10
+
The Parameters utility provides high-level functionality to retrieve one or multiple parameter values from [AWS Systems Manager Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html){target="_blank"}, [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/){target="_blank"}, or [Amazon DynamoDB](https://aws.amazon.com/dynamodb/){target="_blank"}. We also provide extensibility to bring your own providers.
8
11
9
12
## Key features
10
13
11
14
* Retrieve one or multiple parameters from the underlying provider
12
15
* Cache parameter values for a given amount of time (defaults to 5 seconds)
13
16
* Transform parameter values from JSON or base 64 encoded strings
14
-
* Bring Your Own Parameter Store Provider
17
+
* Bring your own parameter store provider
15
18
16
-
## Install
19
+
## Installation
17
20
18
-
Powertools are available as NuGet packages. You can install the packages from NuGet gallery or from Visual Studio editor. Search`AWS.Lambda.Powertools*` to see various utilities available.
21
+
Powertools are available as NuGet packages. You can install the packages from [NuGet Gallery](https://www.nuget.org/packages?q=AWS+Lambda+Powertools*){target="_blank"} or from Visual Studio editor by searching`AWS.Lambda.Powertools*` to see various utilities available.
The Parameters utility provides high-level functionality to retrieve one or multiple parameter values from [AWS Systems Manager Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html), [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/), or [Amazon DynamoDB](https://aws.amazon.com/dynamodb/). Or bring your own providers.
4
+
5
+
## Key features
6
+
7
+
* Retrieve one or multiple parameters from the underlying provider
8
+
* Cache parameter values for a given amount of time (defaults to 5 seconds)
9
+
* Transform parameter values from JSON or base 64 encoded strings
10
+
* Bring your own parameter store provider
11
+
12
+
## Read the docs
13
+
14
+
For a full list of features go to [awslabs.github.io/aws-lambda-powertools-dotnet/utilities/parameters/](awslabs.github.io/aws-lambda-powertools-dotnet/utilities/parameters/)
0 commit comments