public async Task DeleteStream( StreamId streamId, int expectedVersion = -2, CancellationToken cancellationToken = new CancellationToken()) { var span = _spanSource.Begin("stream-store." + nameof(DeleteStream), ServiceName, streamId, TypeName); try { await _streamStore .DeleteStream( streamId, expectedVersion, cancellationToken); } catch (Exception ex) { span?.SetError(ex); throw; } finally { span?.Dispose(); } }
public async Task DeleteStream( StreamId streamId, int expectedVersion = -2, CancellationToken cancellationToken = new CancellationToken()) => await Trace( nameof(DeleteStream), streamId, () => _streamStore.DeleteStream(streamId, expectedVersion, cancellationToken));