Beispiel #1
0
 private void log_command_retrying(RetryingEventArgs args)
 {
     Log.bound_to(this).log_a_warning_event_containing(
         "Failure executing command, trying again (current retry count:{0}){1}{2}",
         args.CurrentRetryCount,
         Environment.NewLine,
         args.LastException.to_string());
 }
Beispiel #2
0
 private void GlobalConnectionPolicyOnRetrying(object sender, RetryingEventArgs retryingEventArgs)
 {
     if (Retrying != null)
     {
         var ev = Retrying;
         ev(sender, retryingEventArgs);
     }
 }
        /// <summary>
        /// Publisher for ShardMapManagerRetryingEvent event.
        /// </summary>
        /// <param name="arg">Event argument.</param>
        internal void OnShardMapManagerRetryingEvent(RetryingEventArgs arg)
        {
            EventHandler <RetryingEventArgs> handler = this.ShardMapManagerRetrying;

            if (handler != null)
            {
                handler(this, arg);
            }
        }
 private void RetryWaring(RetryingEventArgs e)
 {
     this.dynamicThrottling.Penalize();
     Trace.TraceWarning(
         "An error occurred in attempt number {1} to receive a message from subscription {2}: {0}",
         e.LastException.Message,
         e.CurrentRetryCount,
         this.subscription);
 }
Beispiel #5
0
        protected virtual void RetryPolicyTrace(object sender, RetryingEventArgs args)
        {
            var msg = string.Format(
                "Retry - Count:{0}, Delay:{1}, Exception:{2}",
                args.CurrentRetryCount,
                args.Delay,
                args.LastException);

            TraceHelper.TraceInformation(msg);
        }
        private void onTransientErrorOccurred(object sender, RetryingEventArgs args, TrackerData trackerData)
        {
            var builder = new StringBuilder();

            builder.AppendLine(string.Format("Transient error has occurred while performing the database operation. Retried {0} times. The next attempt will be in {1} ms.", args.CurrentRetryCount, args.Delay.TotalMilliseconds));
            builder.AppendLine(string.Format("Tracker Data: TypeName: {0} KeyFilter: {1} TimeSlot: {2}", trackerData.TypeName, trackerData.KeyFilter, trackerData.TimeSlot));
            builder.AppendLine(args.LastException.Message);
            builder.AppendLine(args.LastException.StackTrace);

            _logger.Warn(builder.ToString());
        }
        protected virtual void RetryPolicyTrace(object sender, RetryingEventArgs args)
        {
            var msg = string.Format(
                "{0} Retry - Count:{1}, Delay:{2}, Exception:{3}",
                this.GetType().Name,
                args.CurrentRetryCount,
                args.Delay,
                args.LastException.TraceInformation());

            Factory <ILogger> .GetInstance().LogWarning(msg);
        }
Beispiel #8
0
        private static void retrying_event(object sender, RetryingEventArgs e)
        {
            SqlException esql = (SqlException)e.LastException;

            // Logging purposes
            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine("[{0}] -- Retry #: {1} --" +
                              " SQL Error: {2} -- Exception Message: {3} \n",
                              DateTime.Now.ToUniversalTime(),
                              e.CurrentRetryCount, esql.Number, esql.Message);
            Console.ForegroundColor = ConsoleColor.White;
        }
Beispiel #9
0
 private static void Retrying(object sender, RetryingEventArgs e)
 {
     SemanticLoggingEventSource.Log.CustomSinkUnhandledFault(e.LastException.ToString());
 }
Beispiel #10
0
 static void RetryingReportTestResult(RetryingEventArgs retryingEventArgs)
 {
     Log.LogDebug($"Retrying ReportTestResult {retryingEventArgs.CurrentRetryCount} times because of error - {retryingEventArgs.LastException}");
 }
 internal static void RetryingGetTwin(RetryingEventArgs args)
 {
     Log.LogDebug((int)EventIds.RetryingGetTwin, $"Edge agent is retrying GetTwinAsync. Attempt #{args.CurrentRetryCount}. Last error: {args.LastException?.Message}");
 }
Beispiel #12
0
 public static void ActionFailed(RetryingEventArgs args, string action)
 {
     Log.LogDebug((int)EventIds.Retrying, $"Service Client threw exception {args.LastException} on action {action}. Current retry count {args.CurrentRetryCount}.");
 }
 private void OnRetry(object sender, RetryingEventArgs e)
 {
     ++this.retryCount;
     this.TraceFailedAttempt(this.retryCount, e.LastException);
 }
 protected virtual void OnRetry(RetryingEventArgs args)
 {
 }
Beispiel #15
0
 public static void UploadErrorRetrying(string blobName, string container, RetryingEventArgs retryingEventArgs)
 {
     Log.LogDebug((int)EventIds.UploadErrorRetrying, retryingEventArgs.LastException, $"Error uploading {blobName} to container {container}. Retry count - {retryingEventArgs.CurrentRetryCount}");
 }
 internal static void RetryingOperation(string operation, string url, RetryingEventArgs r)
 {
     Log.LogDebug((int)EventIds.RetryingOperation, $"Retrying Http call to {url} to {operation} because of error {r.LastException.Message}, retry count = {r.CurrentRetryCount}");
 }
Beispiel #17
0
 private static void OnRetryPolicyRetrying(object sender, RetryingEventArgs e)
 {
     System.Diagnostics.Trace.WriteLine(string.Format("Retrying Sample: Count:{0} Delay:{1} LastError:{2}", e.CurrentRetryCount, e.Delay, e.LastException));
 }
            public static void ErrorProcessingSubscription(string id, DeviceSubscription subscription, bool addSubscription, RetryingEventArgs r)
            {
                Exception ex         = r.LastException;
                string    operation  = addSubscription ? "adding" : "removing";
                int       retryCount = r.CurrentRetryCount;

                if (ex.HasTimeoutException())
                {
                    Log.LogDebug((int)EventIds.ErrorAddingSubscription, ex, Invariant($"Timed out while processing subscription {subscription} for client {id} on attempt {retryCount}."));
                }
                else
                {
                    Log.LogDebug((int)EventIds.ErrorRemovingSubscription, ex, Invariant($"Error {operation} subscription {subscription} for client {id} on attempt {retryCount}."));
                }
            }
Beispiel #19
0
 public void testEHandler(object sender, RetryingEventArgs e)
 {
     //TODO log somewhere? mail?
     //Logger.war
 }
Beispiel #20
0
 private static void Retrying(object sender, RetryingEventArgs e)
 {
     SemanticLoggingEventSource.Log.DatabaseSinkPublishEventsTransientError(e.LastException.ToString());
 }
Beispiel #21
0
 public static void RetryingGetIdentities(RetryingEventArgs retryingEventArgs)
 {
     Log.LogDebug((int)EventIds.Retrying, $"Retrying device scope api call because {retryingEventArgs.CurrentRetryCount} times because of error - {retryingEventArgs.LastException}");
 }
Beispiel #22
0
 protected override void OnRetry(RetryingEventArgs args)
 {
     Retried++;
 }
Beispiel #23
0
        private void RetryPolicyRetrying(object sender, RetryingEventArgs e)
        {
            _logger.LogInformation(string.Format("Config Service retry count: {0}", e.CurrentRetryCount));

            _logger.LogError(e.LastException.Message);
        }
Beispiel #24
0
 public static void RetryingDeviceClientConnection(RetryingEventArgs args)
 {
     Log.LogDebug(
         (int)EventIds.RetryingDeviceClientConnection,
         $"Retrying connection to IoT Hub. Current retry count {args.CurrentRetryCount}.");
 }
Beispiel #25
0
 private static void retryPolicy_Retrying(object sender, RetryingEventArgs e)
 {
     Console.WriteLine("retrying");
 }