Skip to content

Commit

Permalink
Add command text to SQL command
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredcnance committed Dec 19, 2018
1 parent bc7c57e commit c7f1936
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions sdk/src/Handlers/SqlServer/TraceableSqlCommand.netstandard.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
//-----------------------------------------------------------------------------
// <copyright file="TraceableSqlCommand.netstandard.cs" company="Amazon.com">
// Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the License.
// A copy of the License is located at
//
// http://aws.amazon.com/apache2.0
//
// or in the "license" file accompanying this file. This file is distributed
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.
// </copyright>
//-----------------------------------------------------------------------------
// <copyright file="TraceableSqlCommand.netstandard.cs" company="Amazon.com">
// Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the License.
// A copy of the License is located at
//
// http://aws.amazon.com/apache2.0
//
// or in the "license" file accompanying this file. This file is distributed
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.
// </copyright>
//-----------------------------------------------------------------------------

using System;
Expand Down Expand Up @@ -187,8 +187,8 @@ protected override DbTransaction DbTransaction
protected override DbParameterCollection DbParameterCollection
{
get { return Parameters; }
}

}

/// <summary>
/// Attempts to cancels the execution of a <see cref="T:System.Data.SqlClient.SqlCommand" />.
/// </summary>
Expand Down Expand Up @@ -454,6 +454,7 @@ private void CollectSqlInformation()

recorder.AddSqlInformation("user", connectionStringBuilder.UserID);
recorder.AddSqlInformation("connection_string", connectionStringBuilder.ToString());
recorder.AddSqlInformation("sanitized_query", CommandText);
}
}
}

0 comments on commit c7f1936

Please sign in to comment.