Skip to content

Commit 64e9574

Browse files
authored
Merge branch 'develop' into fix-common-dependency
Signed-off-by: Henrique Graca <[email protected]>
2 parents f9cfc2a + a36ebd9 commit 64e9574

File tree

13 files changed

+119
-20
lines changed

13 files changed

+119
-20
lines changed

CHANGELOG.md

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,58 @@ All notable changes to this project will be documented in this file.
77
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
88

99

10+
<a name="1.6.0"></a>
11+
## [1.6.0] - 2023-09-07
12+
## Pull Requests
13+
14+
* Merge pull request [#433](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/433) from amirkaws/release-version-1.6.0-in-preview-fix
15+
* Merge pull request [#432](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/432) from amirkaws/release-version-1.6.0-document-fix
16+
* Merge pull request [#430](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/430) from amirkaws/release-version-1.6.0
17+
* Merge pull request [#428](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/428) from amirkaws/automatic-xray-register
18+
* Merge pull request [#400](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/400) from aws-powertools/hjgraca-fix-idempotency-docs
19+
* Merge pull request [#391](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/391) from aws-powertools/hjgraca-patch-dependabot
20+
21+
22+
<a name="1.5.0"></a>
23+
## [1.5.0] - 2023-08-29
24+
## Pull Requests
25+
26+
* Merge pull request [#397](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/397) from aws-powertools/hjgraca-version-1.5.0
27+
* Merge pull request [#363](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/363) from hjgraca/idempotency-inprogressexpiration
28+
29+
30+
<a name="1.4.2"></a>
31+
## [1.4.2] - 2023-08-22
32+
## Maintenance
33+
34+
* **deps:** bump AWSSDK.SecretsManager in /libraries
35+
* **deps:** bump xunit from 2.4.1 to 2.4.2 in /libraries
36+
* **deps:** bump Moq from 4.18.1 to 4.18.4 in /libraries
37+
* **deps:** bump AWSSDK.DynamoDBv2 in /libraries
38+
* **deps:** bump Testcontainers from 3.2.0 to 3.3.0 in /libraries
39+
* **deps:** bump AWSXRayRecorder.Core in /libraries
40+
41+
## Pull Requests
42+
43+
* Merge pull request [#388](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/388) from amirkaws/update-samples-nuget-versions
44+
* Merge pull request [#383](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/383) from aws-powertools/hjgraca-patch-version-1.4.2
45+
* Merge pull request [#381](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/381) from aws-powertools/hjgraca-patch-dependabot
46+
* Merge pull request [#375](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/375) from amirkaws/custom-log-formatter
47+
* Merge pull request [#357](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/357) from hjgraca/fix-capture-stacktrace
48+
* Merge pull request [#343](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/343) from aws-powertools/update-changelog-5462167625
49+
* Merge pull request [#370](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/370) from amirkaws/replace-moq-with-nsubstitute
50+
* Merge pull request [#359](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/359) from aws-powertools/dependabot/nuget/libraries/develop/AWSSDK.SecretsManager-3.7.200.3
51+
* Merge pull request [#342](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/342) from hjgraca/idempotency-simpler-example
52+
* Merge pull request [#347](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/347) from hjgraca/docs-clarify-xray-over-adot
53+
* Merge pull request [#338](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/338) from aws-powertools/hjgraca-patch-boring-cyborg
54+
* Merge pull request [#349](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/349) from hossambarakat/feature/idempotent-function
55+
* Merge pull request [#328](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/328) from aws-powertools/dependabot/nuget/libraries/develop/xunit-2.4.2
56+
* Merge pull request [#327](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/327) from aws-powertools/dependabot/nuget/libraries/develop/AWSSDK.DynamoDBv2-3.7.104.1
57+
* Merge pull request [#325](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/325) from aws-powertools/dependabot/nuget/libraries/develop/AWSXRayRecorder.Core-2.14.0
58+
* Merge pull request [#326](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/326) from aws-powertools/dependabot/nuget/libraries/develop/Testcontainers-3.3.0
59+
* Merge pull request [#329](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/329) from aws-powertools/dependabot/nuget/libraries/develop/Moq-4.18.4
60+
61+
1062
<a name="1.4.1"></a>
1163
## [1.4.1] - 2023-06-29
1264
## Maintenance
@@ -400,7 +452,10 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
400452
* Merge pull request [#1](https://github.com/aws-powertools/powertools-lambda-dotnet/issues/1) from sliedig/develop
401453

402454

403-
[Unreleased]: https://github.com/aws-powertools/powertools-lambda-dotnet/compare/1.4.1...HEAD
455+
[Unreleased]: https://github.com/aws-powertools/powertools-lambda-dotnet/compare/1.6.0...HEAD
456+
[1.6.0]: https://github.com/aws-powertools/powertools-lambda-dotnet/compare/1.5.0...1.6.0
457+
[1.5.0]: https://github.com/aws-powertools/powertools-lambda-dotnet/compare/1.4.2...1.5.0
458+
[1.4.2]: https://github.com/aws-powertools/powertools-lambda-dotnet/compare/1.4.1...1.4.2
404459
[1.4.1]: https://github.com/aws-powertools/powertools-lambda-dotnet/compare/1.4.0...1.4.1
405460
[1.4.0]: https://github.com/aws-powertools/powertools-lambda-dotnet/compare/1.3.0...1.4.0
406461
[1.3.0]: https://github.com/aws-powertools/powertools-lambda-dotnet/compare/1.2.0...1.3.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Powertools for AWS Lambda (.NET) provides three core utilities:
2525

2626
* **[Tracing](https://docs.powertools.aws.dev/lambda/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.
2727

28-
* **[Parameters (developer preview)](https://docs.powertools.aws.dev/lambda/dotnet/utilities/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), [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/), or [Amazon DynamoDB](https://aws.amazon.com/dynamodb/). We also provide extensibility to bring your own providers.
28+
* **[Parameters](https://docs.powertools.aws.dev/lambda/dotnet/utilities/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), [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/), or [Amazon DynamoDB](https://aws.amazon.com/dynamodb/). We also provide extensibility to bring your own providers.
2929

3030
* **[Idempotency (developer preview)](https://docs.powertools.aws.dev/lambda/dotnet/utilities/idempotency/)** - The idempotency utility provides a simple solution to convert your Lambda functions into idempotent operations which are safe to retry.
3131

docs/core/tracing.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,5 +244,36 @@ under a subsegment, or you are doing multithreaded programming. Refer examples b
244244

245245
## Instrumenting SDK clients and HTTP calls
246246

247-
User should make sure to instrument the SDK clients explicitly based on the function dependency. Refer details on
248-
[how to instrument SDK client with Xray](https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-dotnet-sdkclients.html) and [outgoing http calls](https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-dotnet-httpclients.html).
247+
You should make sure to instrument the SDK clients explicitly based on the function dependency. You can instrument all of your AWS SDK for .NET clients by calling RegisterForAllServices before you create them.
248+
249+
=== "Function.cs"
250+
251+
```c# hl_lines="14"
252+
using Amazon.DynamoDBv2;
253+
using Amazon.DynamoDBv2.Model;
254+
using AWS.Lambda.Powertools.Tracing;
255+
256+
public class Function
257+
{
258+
private static IAmazonDynamoDB _dynamoDb;
259+
260+
/// <summary>
261+
/// Function constructor
262+
/// </summary>
263+
public Function()
264+
{
265+
Tracing.RegisterForAllServices();
266+
267+
_dynamoDb = new AmazonDynamoDBClient();
268+
}
269+
}
270+
```
271+
272+
To instrument clients for some services and not others, call Register instead of RegisterForAllServices. Replace the highlighted text with the name of the service's client interface.
273+
274+
```c#
275+
Tracing.Register<IAmazonDynamoDB>()
276+
```
277+
278+
This functionality is a thin wrapper for AWS X-Ray .NET SDK. Refer details on [how to instrument SDK client with Xray](https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-dotnet-sdkclients.html) and [outgoing http calls](https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-dotnet-httpclients.html).
279+

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Core utilities such as Tracing, Logging, and Metrics will be available across al
2929
[Tracing](./core/tracing.md) | Decorators and utilities to trace Lambda function handlers, and both synchronous and asynchronous functions
3030
[Logger](./core/logging.md) | Structured logging made easier, and decorator to enrich structured logging with key Lambda context details
3131
[Metrics](./core/metrics.md) | Custom AWS metrics created asynchronously via CloudWatch Embedded Metric Format (EMF)
32-
[Parameters (developer preview)](./utilities/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.
32+
[Parameters](./utilities/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.
3333
[Idempotency (developer preview)](./utilities/idempotency/) | The idempotency utility provides a simple solution to convert your Lambda functions into idempotent operations which are safe to retry.
3434

3535
## Install

docs/tenets.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Powertools for AWS Lambda (.NET) (developer preview)
3-
description: Powertools for AWS Lambda (.NET) (developer preview)
2+
title: Powertools for AWS Lambda (.NET)
3+
description: Powertools for AWS Lambda (.NET)
44
---
55

66
Core utilities such as Tracing, Logging, Metrics, and Event Handler will be available across all Powertools for AWS Lambda runtimes. Additional utilities are subjective to each language ecosystem and customer demand.

docs/utilities/parameters.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ title: Parameters
33
description: Utility
44
---
55

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/aws-powertools/powertools-lambda-dotnet/milestone/2) we may introduce significant breaking changes and improvements in response to customers feedback.
8-
96
<!-- markdownlint-disable MD013 -->
107
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.
118

examples/Parameters/src/HelloWorld/HelloWorld.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<PackageReference Include="Amazon.Lambda.Core" Version="2.1.0" />
99
<PackageReference Include="Amazon.Lambda.APIGatewayEvents" Version="2.6.0" />
1010
<PackageReference Include="Amazon.Lambda.Serialization.SystemTextJson" Version="2.3.0" />
11-
<PackageReference Include="AWS.Lambda.Powertools.Parameters" Version="0.0.3-preview" />
11+
<PackageReference Include="AWS.Lambda.Powertools.Parameters" Version="1.0.0" />
1212
</ItemGroup>
1313
</Project>

examples/ServerlessApi/src/LambdaPowertoolsAPI/LambdaPowertoolsAPI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
<PackageReference Include="Amazon.Lambda.AspNetCoreServer" Version="8.1.0" />
1616
<PackageReference Include="AWS.Lambda.Powertools.Logging" Version="1.2.0" />
1717
<PackageReference Include="AWS.Lambda.Powertools.Metrics" Version="1.3.3" />
18-
<PackageReference Include="AWS.Lambda.Powertools.Tracing" Version="1.1.2" />
18+
<PackageReference Include="AWS.Lambda.Powertools.Tracing" Version="1.2.0" />
1919
</ItemGroup>
2020
</Project>

examples/Tracing/src/HelloWorld/Function.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
using Amazon.Lambda.APIGatewayEvents;
2525
using Amazon.Lambda.Core;
2626
using Amazon.Lambda.Serialization.SystemTextJson;
27-
using Amazon.XRay.Recorder.Handlers.AwsSdk;
2827
using AWS.Lambda.Powertools.Logging;
2928
using AWS.Lambda.Powertools.Tracing;
3029

@@ -43,7 +42,7 @@ public class Function
4342
/// </summary>
4443
public Function()
4544
{
46-
AWSSDKHandler.RegisterXRayForAllServices();
45+
Tracing.RegisterForAllServices();
4746
_httpClient = new HttpClient();
4847

4948
var tableName = Environment.GetEnvironmentVariable("TABLE_NAME");

examples/Tracing/src/HelloWorld/HelloWorld.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
<PackageReference Include="Amazon.Lambda.APIGatewayEvents" Version="2.6.0" />
1010
<PackageReference Include="Amazon.Lambda.Serialization.SystemTextJson" Version="2.3.1" />
1111
<PackageReference Include="AWS.Lambda.Powertools.Logging" Version="1.2.0" />
12-
<PackageReference Include="AWS.Lambda.Powertools.Tracing" Version="1.1.2" />
12+
<PackageReference Include="AWS.Lambda.Powertools.Tracing" Version="1.2.0" />
1313
<PackageReference Include="AWSSDK.DynamoDBv2" Version="3.7.200.23" />
14-
<PackageReference Include="AWSXRayRecorder.Handlers.AwsSdk" Version="2.12.0" />
1514
</ItemGroup>
1615
</Project>

0 commit comments

Comments
 (0)