예제 #1
0
        public async Task DeleteMessage(
            StreamId streamId,
            Guid messageId,
            CancellationToken cancellationToken = new CancellationToken())
        {
            var span = _spanSource.Begin("stream-store." + nameof(DeleteMessage), ServiceName, $"{streamId}/{messageId}", TypeName);

            try
            {
                await _streamStore
                .DeleteMessage(
                    streamId,
                    messageId,
                    cancellationToken);
            }
            catch (Exception ex)
            {
                span?.SetError(ex);
                throw;
            }
            finally
            {
                span?.Dispose();
            }
        }
예제 #2
0
 public async Task DeleteMessage(
     StreamId streamId,
     Guid messageId,
     CancellationToken cancellationToken = new CancellationToken())
 => await Trace(
     nameof(DeleteMessage),
     $"{streamId}/{messageId}",
     () => _streamStore.DeleteMessage(streamId, messageId, cancellationToken));