We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b27fdb9 commit 98f1342Copy full SHA for 98f1342
1 file changed
examples/Tracing/src/HelloWorld/Function.cs
@@ -87,13 +87,10 @@ public async Task<APIGatewayProxyResponse> FunctionHandler(APIGatewayProxyReques
87
greeting: "Hello Powertools for AWS Lambda (.NET)", ipAddress: location);
88
89
// Trace Fluent API
90
- Tracing.WithSubsegment("LoggingResponse",
91
- subsegment =>
92
- {
93
- subsegment.AddAnnotation("AccountId", apigwProxyEvent.RequestContext.AccountId);
94
- subsegment.AddMetadata("LookupRecord", lookupRecord);
95
- });
96
-
+ using var gatewaySegment = Tracing.BeginSubsegment("LoggingResponse");
+ gatewaySegment.AddAnnotation("AccountId", apigwProxyEvent.RequestContext.AccountId);
+ gatewaySegment.AddMetadata("LookupRecord", lookupRecord);
+
97
try
98
{
99
await SaveRecordInDynamo(lookupRecord);
0 commit comments