public async Task <ReadStreamPage> ReadStreamBackwards( StreamId streamId, int fromVersionInclusive, int maxCount, bool prefetchJsonData = true, CancellationToken cancellationToken = new CancellationToken()) { var span = _spanSource.Begin("stream-store." + nameof(ReadStreamBackwards), ServiceName, streamId, TypeName); try { return(await _streamStore .ReadStreamBackwards( streamId, fromVersionInclusive, maxCount, prefetchJsonData, cancellationToken)); } catch (Exception ex) { span?.SetError(ex); throw; } finally { span?.Dispose(); } }
public async Task <ReadStreamPage> ReadStreamBackwards( StreamId streamId, int fromVersionInclusive, int maxCount, bool prefetchJsonData = true, CancellationToken cancellationToken = new CancellationToken()) => await Trace( nameof(ReadStreamBackwards), streamId, () => _streamStore.ReadStreamBackwards(streamId, fromVersionInclusive, maxCount, prefetchJsonData, cancellationToken));