public virtual Response <DiagnosticDetectorResponse> Execute(DateTimeOffset?startTime = null, DateTimeOffset?endTime = null, string timeGrain = null, CancellationToken cancellationToken = default) { using var scope = _siteDiagnosticDetectorDiagnosticsClientDiagnostics.CreateScope("SiteDiagnosticDetector.Execute"); scope.Start(); try { var response = _siteDiagnosticDetectorDiagnosticsRestClient.ExecuteSiteDetector(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, startTime, endTime, timeGrain, cancellationToken); return(response); } catch (Exception e) { scope.Failed(e); throw; } }