Example #1
0
        public virtual async Task <Response <ExpressRouteCircuitStats> > GetStatsAsync(CancellationToken cancellationToken = default)
        {
            using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuit.GetStats");
            scope.Start();
            try
            {
                var response = await _restClient.GetStatsAsync(Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);

                return(response);
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }