diff --git a/dotnet6/hello-pt/{{cookiecutter.project_name}}/src/HelloWorld/Function.cs b/dotnet6/hello-pt/{{cookiecutter.project_name}}/src/HelloWorld/Function.cs index 084e37b3f..058c18ed5 100644 --- a/dotnet6/hello-pt/{{cookiecutter.project_name}}/src/HelloWorld/Function.cs +++ b/dotnet6/hello-pt/{{cookiecutter.project_name}}/src/HelloWorld/Function.cs @@ -7,7 +7,6 @@ using Amazon.Lambda.Core; using Amazon.Lambda.APIGatewayEvents; {%- if cookiecutter["Powertools for AWS Lambda (.NET) Tracing"] == "enabled"%} -using Amazon.XRay.Recorder.Handlers.AwsSdk; using AWS.Lambda.Powertools.Tracing; {%- endif %} {%- if cookiecutter["Powertools for AWS Lambda (.NET) Metrics"] == "enabled"%} @@ -29,7 +28,7 @@ public class Function {%- if cookiecutter["Powertools for AWS Lambda (.NET) Tracing"] == "enabled"%} public Function() { - AWSSDKHandler.RegisterXRayForAllServices(); + Tracing.RegisterForAllServices(); } {%- endif %} diff --git a/dotnet6/hello-pt/{{cookiecutter.project_name}}/src/HelloWorld/HelloWorld.csproj b/dotnet6/hello-pt/{{cookiecutter.project_name}}/src/HelloWorld/HelloWorld.csproj index 6f9d45081..a5d78e7e9 100644 --- a/dotnet6/hello-pt/{{cookiecutter.project_name}}/src/HelloWorld/HelloWorld.csproj +++ b/dotnet6/hello-pt/{{cookiecutter.project_name}}/src/HelloWorld/HelloWorld.csproj @@ -11,14 +11,13 @@ {%- if cookiecutter["Powertools for AWS Lambda (.NET) Tracing"] == "enabled"%} - - + {%- endif %} {%- if cookiecutter["Powertools for AWS Lambda (.NET) Metrics"] == "enabled"%} - + {%- endif %} {%- if cookiecutter["Powertools for AWS Lambda (.NET) Logging"] == "enabled"%} - + {%- endif %}