in src/SqlAsyncCollector.cs [139:160]
public async Task FlushAsync(CancellationToken cancellationToken = default)
{
await this._rowLock.WaitAsync(cancellationToken);
try
{
if (this._rows.Count != 0)
{
TelemetryInstance.TrackEvent(TelemetryEventName.FlushAsync);
await this.UpsertRowsAsync(this._rows, this._attribute, this._configuration);
this._rows.Clear();
}
}
catch (Exception ex)
{
TelemetryInstance.TrackException(TelemetryErrorName.FlushAsync, ex);
throw;
}
finally
{
this._rowLock.Release();
}
}