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