Skip to content

Commit 43b2aab

Browse files
committed
fix sonar
1 parent 5f13f6e commit 43b2aab

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

libraries/src/AWS.Lambda.Powertools.Tracing/Internal/TracingAspectHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ internal class TracingAspectHandler : IMethodAspectHandler
5555
/// <summary>
5656
/// Tracing namespace
5757
/// </summary>
58-
private string _namespace;
58+
private readonly string _namespace;
5959

6060
/// <summary>
6161
/// The capture mode
6262
/// </summary>
63-
private TracingCaptureMode _captureMode;
63+
private readonly TracingCaptureMode _captureMode;
6464

6565
/// <summary>
6666
/// The segment name

libraries/src/AWS.Lambda.Powertools.Tracing/TracingAttribute.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
/*
22
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
*
3+
*
44
* Licensed under the Apache License, Version 2.0 (the "License").
55
* You may not use this file except in compliance with the License.
66
* A copy of the License is located at
7-
*
7+
*
88
* http://aws.amazon.com/apache2.0
9-
*
9+
*
1010
* or in the "license" file accompanying this file. This file is distributed
1111
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
1212
* express or implied. See the License for the specific language governing
1313
* permissions and limitations under the License.
1414
*/
1515

16+
using System;
1617
using AWS.Lambda.Powertools.Common;
1718
using AWS.Lambda.Powertools.Tracing.Internal;
1819

@@ -105,6 +106,7 @@ namespace AWS.Lambda.Powertools.Tracing;
105106
/// }
106107
/// </code>
107108
/// </example>
109+
[AttributeUsage(AttributeTargets.Method)]
108110
public class TracingAttribute : MethodAspectAttribute
109111
{
110112
/// <summary>

0 commit comments

Comments
 (0)