internal IOperationScope BeginChildScope(string name, Action <IOperationScope> configAction = null)
        {
            var newScope = new LocalOperationScope(this, Current, name);

            configAction?.Invoke(newScope);

            return(newScope);
        }
        internal IOperationScope EndScope(LocalOperationScope scope)
        {
            if (!Equals(scope, Current))
            {
                throw new InvalidOperationException($"Cannot finilize scope '{scope}' before finalizing his child scopes");
            }

            _localOperationScope.Value = scope.ParentOperationScope;
            return(_localOperationScope.Value);
        }