Esempio n. 1
0
        public async Task <long> ReadHeadPosition(CancellationToken cancellationToken = new CancellationToken())
        {
            var span = _spanSource.Begin("stream-store." + nameof(ReadHeadPosition), ServiceName, "head", TypeName);

            try
            {
                return(await _streamStore.ReadHeadPosition(cancellationToken));
            }
            catch (Exception ex)
            {
                span?.SetError(ex);
                throw;
            }
            finally
            {
                span?.Dispose();
            }
        }
Esempio n. 2
0
 public async Task <long> ReadHeadPosition(CancellationToken cancellationToken = new CancellationToken())
 => await Trace(
     nameof(ReadHeadPosition),
     "head",
     () => _streamStore.ReadHeadPosition(cancellationToken));