File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
examples/Tracing/src/HelloWorld Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -87,13 +87,10 @@ public async Task<APIGatewayProxyResponse> FunctionHandler(APIGatewayProxyReques
8787 greeting : "Hello Powertools for AWS Lambda (.NET)" , ipAddress : location ) ;
8888
8989 // Trace Fluent API
90- Tracing . WithSubsegment ( "LoggingResponse" ,
91- subsegment =>
92- {
93- subsegment . AddAnnotation ( "AccountId" , apigwProxyEvent . RequestContext . AccountId ) ;
94- subsegment . AddMetadata ( "LookupRecord" , lookupRecord ) ;
95- } ) ;
96-
90+ using var gatewaySegment = Tracing . BeginSubsegment ( "LoggingResponse" ) ;
91+ gatewaySegment . AddAnnotation ( "AccountId" , apigwProxyEvent . RequestContext . AccountId ) ;
92+ gatewaySegment . AddMetadata ( "LookupRecord" , lookupRecord ) ;
93+
9794 try
9895 {
9996 await SaveRecordInDynamo ( lookupRecord ) ;
You can’t perform that action at this time.
0 commit comments