File tree Expand file tree Collapse file tree 6 files changed +8
-8
lines changed
AWS.Lambda.Powertools.Common/Core
AWS.Lambda.Powertools.Metrics/Model
tests/AWS.Lambda.Powertools.Metrics.Tests Expand file tree Collapse file tree 6 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 9
9
],
10
10
"dest" : " api" ,
11
11
"properties" : {
12
- "TargetFramework" : " net6 .0"
12
+ "TargetFramework" : " net8 .0"
13
13
},
14
14
"disableGitFeatures" : false ,
15
15
"disableDefaultFilter" : false
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ Powertools for AWS Lambda (.NET) are available as NuGet packages. You can instal
35
35
36
36
* [ AWS.Lambda.Powertools.Metrics] ( https://www.nuget.org/packages?q=AWS.Lambda.Powertools.Metrics ) :
37
37
38
- ` dotnet nuget add AWS.Lambda.Powertools.Metrics `
38
+ ` dotnet add package AWS.Lambda.Powertools.Metrics `
39
39
40
40
## Terminologies
41
41
@@ -608,7 +608,7 @@ CloudWatch EMF uses the same dimensions across all your metrics. Use **`PushSing
608
608
public async Task<APIGatewayProxyResponse> FunctionHandler(APIGatewayProxyRequest apigProxyEvent, ILambdaContext context)
609
609
{
610
610
Metrics.PushSingleMetric(
611
- metricName : "ColdStart",
611
+ name : "ColdStart",
612
612
value: 1,
613
613
unit: MetricUnit.Count,
614
614
nameSpace: "ExampleApplication",
@@ -632,7 +632,7 @@ By default it will skip all previously defined dimensions including default dime
632
632
public async Task<APIGatewayProxyResponse> FunctionHandler(APIGatewayProxyRequest apigProxyEvent, ILambdaContext context)
633
633
{
634
634
Metrics.PushSingleMetric(
635
- metricName : "ColdStart",
635
+ name : "ColdStart",
636
636
value: 1,
637
637
unit: MetricUnit.Count,
638
638
nameSpace: "ExampleApplication",
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ Powertools for AWS Lambda (.NET) are available as NuGet packages. You can instal
28
28
29
29
* [ AWS.Lambda.Powertools.Metrics] ( https://www.nuget.org/packages?q=AWS.Lambda.Powertools.Metrics ) :
30
30
31
- ` dotnet nuget add AWS.Lambda.Powertools.Metrics `
31
+ ` dotnet add package AWS.Lambda.Powertools.Metrics -v 1.7.1 `
32
32
33
33
## Terminologies
34
34
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ public class PowertoolsConfigurations : IPowertoolsConfigurations
27
27
/// <summary>
28
28
/// The maximum dimensions
29
29
/// </summary>
30
- public const int MaxDimensions = 9 ;
30
+ public const int MaxDimensions = 29 ;
31
31
32
32
/// <summary>
33
33
/// The maximum metrics
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ internal void AddDimension(DimensionSet dimension)
204
204
else
205
205
{
206
206
throw new ArgumentOutOfRangeException ( nameof ( Dimensions ) ,
207
- "Cannot add more than 9 dimensions at the same time." ) ;
207
+ $ "Cannot add more than { PowertoolsConfigurations . MaxDimensions } dimensions at the same time.") ;
208
208
}
209
209
}
210
210
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ public void WhenMaxDataPointsAreAddedToTheSameMetric_FlushAutomatically()
113
113
public void WhenMoreThan9DimensionsAdded_ThrowArgumentOutOfRangeException ( )
114
114
{
115
115
// Act
116
- var act = ( ) => { _handler . MaxDimensions ( 9 ) ; } ;
116
+ var act = ( ) => { _handler . MaxDimensions ( 29 ) ; } ;
117
117
118
118
// Assert
119
119
Assert . Throws < ArgumentOutOfRangeException > ( act ) ;
You can’t perform that action at this time.
0 commit comments