diff --git a/src/SqlAsyncCollector.cs b/src/SqlAsyncCollector.cs index ca6e420b1..2a49e88d3 100644 --- a/src/SqlAsyncCollector.cs +++ b/src/SqlAsyncCollector.cs @@ -160,7 +160,9 @@ private async Task UpsertRowsAsync(IEnumerable rows, SqlAttribute attribute, var upsertRowsAsyncSw = Stopwatch.StartNew(); using (SqlConnection connection = SqlBindingUtilities.BuildConnection(attribute.ConnectionStringSetting, configuration)) { + this._logger.LogDebugWithThreadId("BEGIN OpenUpsertRowsAsyncConnection"); await connection.OpenAsync(); + this._logger.LogDebugWithThreadId("END OpenUpsertRowsAsyncConnection"); Dictionary props = connection.AsConnectionProps(); string fullTableName = attribute.CommandText; @@ -403,7 +405,7 @@ public TableInformation(IEnumerable primaryKeys, IDictionary BuildItemFromAttributeAsync(SqlAttribute attri using (SqlCommand command = SqlBindingUtilities.BuildCommand(attribute, connection)) { adapter.SelectCommand = command; + this._logger.LogDebugWithThreadId("BEGIN OpenBuildItemFromAttributeAsyncConnection"); await connection.OpenAsync(); + this._logger.LogDebugWithThreadId("END OpenBuildItemFromAttributeAsyncConnection"); Dictionary props = connection.AsConnectionProps(); TelemetryInstance.TrackConvert(type, props); var dataTable = new DataTable();