public void UnsupportedKeyError( System.Exception ex) { FGDiagnosticsAutoLoggerSamplesConsoleApplication1EventSource.Current.UnsupportedKeyError( _autogenerated, _machineName, ex ); System.Diagnostics.Debug.WriteLine($"[ConsoleRunner, Error] ERR: UnsupportedKeyError"); System.Diagnostics.Debug.WriteLine($"\t_autogenerated:\t{_autogenerated}"); System.Diagnostics.Debug.WriteLine($"\tEnvironment.MachineName:\t{Environment.MachineName}"); System.Diagnostics.Debug.WriteLine($"\tex.Message:\t{ex.Message}"); System.Diagnostics.Debug.WriteLine($"\tex.Source:\t{ex.Source}"); System.Diagnostics.Debug.WriteLine($"\tex.GetType().FullName:\t{ex.GetType().FullName}"); System.Diagnostics.Debug.WriteLine($"\tex.AsJson():\t{ex.AsJson()}"); _telemetryClient.TrackException( ex, new System.Collections.Generic.Dictionary <string, string>() { { "Name", "UnsupportedKeyError" }, { "Autogenerated", _autogenerated.ToString() }, { "MachineName", Environment.MachineName }, { "Message", ex.Message }, { "Source", ex.Source }, { "ExceptionTypeName", ex.GetType().FullName }, { "Exception", ex.AsJson() } }); }
public void Error( System.Exception exception) { Sample.Current.Error( _actorId, _processId, _machineName, exception ); System.Diagnostics.Debug.WriteLine($"[Console, Error] ERR: Error"); System.Diagnostics.Debug.WriteLine($"\t_actorId.ToString():\t{_actorId.ToString()}"); System.Diagnostics.Debug.WriteLine($"\t_actorId.Kind.ToString():\t{_actorId.Kind.ToString()}"); System.Diagnostics.Debug.WriteLine($"\t_processId:\t{_processId}"); System.Diagnostics.Debug.WriteLine($"\tEnvironment.MachineName:\t{Environment.MachineName}"); System.Diagnostics.Debug.WriteLine($"\texception.Message:\t{exception.Message}"); System.Diagnostics.Debug.WriteLine($"\texception.Source:\t{exception.Source}"); System.Diagnostics.Debug.WriteLine($"\texception.GetType().FullName:\t{exception.GetType().FullName}"); System.Diagnostics.Debug.WriteLine($"\texception.AsJson():\t{exception.AsJson()}"); _telemetryClient.TrackException( exception, new System.Collections.Generic.Dictionary <string, string>() { { "Name", "Error" }, { "ActorId", _actorId.ToString() }, { "ActorIdType", _actorId.Kind.ToString() }, { "ProcessId", _processId.ToString() }, { "MachineName", Environment.MachineName }, { "Message", exception.Message }, { "Source", exception.Source }, { "ExceptionTypeName", exception.GetType().FullName }, { "Exception", exception.AsJson() } }); }
public void FailedToGetServiceMethodName( System.Uri requestUri, int interfaceId, int methodId, System.Exception ex) { TitleActorServiceEventSource.Current.FailedToGetServiceMethodName( _context, requestUri, interfaceId, methodId, ex ); _telemetryClient.TrackException( ex, new System.Collections.Generic.Dictionary <string, string>() { { "Name", "FailedToGetServiceMethodName" }, { "ServiceName", _context.ServiceName.ToString() }, { "ServiceTypeName", _context.ServiceTypeName }, { "ReplicaOrInstanceId", _context.ReplicaOrInstanceId.ToString() }, { "PartitionId", _context.PartitionId.ToString() }, { "ApplicationName", _context.CodePackageActivationContext.ApplicationName }, { "ApplicationTypeName", _context.CodePackageActivationContext.ApplicationTypeName }, { "NodeName", _context.NodeContext.NodeName }, { "RequestUri", requestUri.ToString() }, { "InterfaceId", interfaceId.ToString() }, { "MethodId", methodId.ToString() }, { "Message", ex.Message }, { "Source", ex.Source }, { "ExceptionTypeName", ex.GetType().FullName }, { "Exception", ex.AsJson() } }); }
public void ActorMessageFailed( string methodName, CodeEffect.ServiceFabric.Services.Remoting.FabricTransport.CustomServiceRequestHeader headers, System.Exception ex) { WebApiServiceEventSource.Current.ActorMessageFailed( _context, methodName, headers, ex ); _telemetryClient.TrackException( ex, new System.Collections.Generic.Dictionary <string, string>() { { "Name", "ActorMessageFailed" }, { "ServiceName", _context.ServiceName.ToString() }, { "ServiceTypeName", _context.ServiceTypeName }, { "ReplicaOrInstanceId", _context.InstanceId.ToString() }, { "PartitionId", _context.PartitionId.ToString() }, { "ApplicationName", _context.CodePackageActivationContext.ApplicationName }, { "ApplicationTypeName", _context.CodePackageActivationContext.ApplicationTypeName }, { "NodeName", _context.NodeContext.NodeName }, { "MethodName", methodName }, { "User", headers?.GetHeader("name") }, { "CorrelationId", headers?.GetHeader("correlation-id") }, { "Message", ex.Message }, { "Source", ex.Source }, { "ExceptionTypeName", ex.GetType().FullName }, { "Exception", ex.AsJson() } }); }
public void CallActorFailed( System.Fabric.StatelessServiceContext context, System.Uri requestUri, string actorMethodName, FG.ServiceFabric.Actors.Remoting.Runtime.ActorMessageHeaders actorMessageHeaders, FG.ServiceFabric.Services.Remoting.FabricTransport.CustomServiceRequestHeader customServiceRequestHeader, System.Exception ex) { if (this.IsEnabled()) { CallActorFailed( context.ServiceName.ToString(), context.ServiceTypeName, context.InstanceId, context.PartitionId, context.CodePackageActivationContext.ApplicationName, context.CodePackageActivationContext.ApplicationTypeName, context.NodeContext.NodeName, requestUri.ToString(), actorMethodName, (actorMessageHeaders?.InterfaceId ?? 0), (actorMessageHeaders?.MethodId ?? 0), actorMessageHeaders?.ActorId.ToString(), customServiceRequestHeader?.GetHeader("userId"), customServiceRequestHeader?.GetHeader("correlationId"), ex.Message, ex.Source, ex.GetType().FullName, ex.AsJson()); } }
public void ServiceClientFailed( System.Fabric.StatefulServiceContext context, System.Uri requestUri, FG.ServiceFabric.Services.Remoting.FabricTransport.CustomServiceRequestHeader customServiceRequestHeader, System.Exception ex) { if (this.IsEnabled()) { ServiceClientFailed( context.ServiceName.ToString(), context.ServiceTypeName, context.ReplicaOrInstanceId, context.PartitionId, context.CodePackageActivationContext.ApplicationName, context.CodePackageActivationContext.ApplicationTypeName, context.NodeContext.NodeName, requestUri.ToString(), customServiceRequestHeader?.GetHeader("userId"), customServiceRequestHeader?.GetHeader("correlationId"), ex.Message, ex.Source, ex.GetType().FullName, ex.AsJson()); } }
public void FailedToReadCustomServiceMessageHeader( Microsoft.ServiceFabric.Services.Remoting.ServiceRemotingMessageHeaders serviceRemotingMessageHeaders, System.Exception ex) { PersonActorServiceEventSource.Current.FailedToReadCustomServiceMessageHeader( _actor, serviceRemotingMessageHeaders, ex ); _telemetryClient.TrackException( ex, new System.Collections.Generic.Dictionary <string, string>() { { "Name", "FailedToReadCustomServiceMessageHeader" }, { "ActorType", _actor.ActorType.ToString() }, { "ActorId", _actor.ActorId.ToString() }, { "ApplicationTypeName", _actor.ApplicationTypeName }, { "ApplicationName", _actor.ApplicationName }, { "ServiceTypeName", _actor.ServiceTypeName }, { "ServiceName", _actor.ToString() }, { "PartitionId", _actor.PartitionId.ToString() }, { "ReplicaOrInstanceId", _actor.ReplicaOrInstanceId.ToString() }, { "NodeName", _actor.NodeName }, { "InterfaceId", (serviceRemotingMessageHeaders?.InterfaceId ?? 0).ToString() }, { "MethodId", (serviceRemotingMessageHeaders?.MethodId ?? 0).ToString() }, { "Message", ex.Message }, { "Source", ex.Source }, { "ExceptionTypeName", ex.GetType().FullName }, { "Exception", ex.AsJson() } }); }
public void RunAsyncLoopFailed( System.Exception ex) { PersonActorServiceEventSource.Current.RunAsyncLoopFailed( _actorService, _context, ex ); _telemetryClient.TrackException( ex, new System.Collections.Generic.Dictionary <string, string>() { { "Name", "RunAsyncLoopFailed" }, { "ActorType", _actorService.ActorTypeInformation.ImplementationType.ToString() }, { "ApplicationTypeName", _actorService.Context.CodePackageActivationContext.ApplicationTypeName }, { "ApplicationName", _actorService.Context.CodePackageActivationContext.ApplicationName }, { "ServiceTypeName", _actorService.Context.ServiceTypeName }, { "ServiceName", _actorService.Context.ServiceName.ToString() }, { "PartitionId", _actorService.Context.PartitionId.ToString() }, { "ReplicaOrInstanceId", _actorService.Context.ReplicaId.ToString() }, { "NodeName", _actorService.Context.NodeContext.NodeName }, { "CorrelationId", FG.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestContext.Current?["correlationId"] }, { "UserId", FG.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestContext.Current?["userId"] }, { "RequestUri", FG.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestContext.Current?["requestUri"] }, { "Message", ex.Message }, { "Source", ex.Source }, { "ExceptionTypeName", ex.GetType().FullName }, { "Exception", ex.AsJson() } }); }
public void ServiceClientFailed( System.Uri requestUri, FG.ServiceFabric.Services.Remoting.FabricTransport.CustomServiceRequestHeader customServiceRequestHeader, System.Exception ex) { WebApiServiceEventSource.Current.ServiceClientFailed( _context, requestUri, customServiceRequestHeader, ex ); _telemetryClient.TrackException( ex, new System.Collections.Generic.Dictionary <string, string>() { { "Name", "ServiceClientFailed" }, { "ServiceName", _context.ServiceName.ToString() }, { "ServiceTypeName", _context.ServiceTypeName }, { "ReplicaOrInstanceId", _context.InstanceId.ToString() }, { "PartitionId", _context.PartitionId.ToString() }, { "ApplicationName", _context.CodePackageActivationContext.ApplicationName }, { "ApplicationTypeName", _context.CodePackageActivationContext.ApplicationTypeName }, { "NodeName", _context.NodeContext.NodeName }, { "RequestUri", requestUri.ToString() }, { "UserId", customServiceRequestHeader?.GetHeader("userId") }, { "CorrelationId", customServiceRequestHeader?.GetHeader("correlationId") }, { "Message", ex.Message }, { "Source", ex.Source }, { "ExceptionTypeName", ex.GetType().FullName }, { "Exception", ex.AsJson() } }); }
public void FailedToGetActorMethodName( CodeEffect.ServiceFabric.Actors.Remoting.Runtime.ActorMessageHeaders actorMessageHeaders, System.Exception ex) { WebApiServiceEventSource.Current.FailedToGetActorMethodName( _context, actorMessageHeaders, ex ); _telemetryClient.TrackException( ex, new System.Collections.Generic.Dictionary <string, string>() { { "Name", "FailedToGetActorMethodName" }, { "ServiceName", _context.ServiceName.ToString() }, { "ServiceTypeName", _context.ServiceTypeName }, { "ReplicaOrInstanceId", _context.InstanceId.ToString() }, { "PartitionId", _context.PartitionId.ToString() }, { "ApplicationName", _context.CodePackageActivationContext.ApplicationName }, { "ApplicationTypeName", _context.CodePackageActivationContext.ApplicationTypeName }, { "NodeName", _context.NodeContext.NodeName }, { "ActorMessageHeaders", actorMessageHeaders.ToString() }, { "Message", ex.Message }, { "Source", ex.Source }, { "ExceptionTypeName", ex.GetType().FullName }, { "Exception", ex.AsJson() } }); }
public void RecieveWebApiRequestFailed( System.Fabric.StatelessServiceContext context, System.Uri requestUri, string payload, string correlationId, string userId, System.Exception exception) { if (this.IsEnabled()) { RecieveWebApiRequestFailed( context.ServiceName.ToString(), context.ServiceTypeName, context.InstanceId, context.PartitionId, context.CodePackageActivationContext.ApplicationName, context.CodePackageActivationContext.ApplicationTypeName, context.NodeContext.NodeName, requestUri.ToString(), payload, correlationId, userId, exception.Message, exception.Source, exception.GetType().FullName, exception.AsJson()); } }
public void FailedToReadCustomServiceMessageHeader( Microsoft.ServiceFabric.Services.Remoting.ServiceRemotingMessageHeaders serviceRemotingMessageHeaders, System.Exception ex) { WebApiServiceEventSource.Current.FailedToReadCustomServiceMessageHeader( _context, serviceRemotingMessageHeaders, ex ); _telemetryClient.TrackException( ex, new System.Collections.Generic.Dictionary <string, string>() { { "Name", "FailedToReadCustomServiceMessageHeader" }, { "ServiceName", _context.ServiceName.ToString() }, { "ServiceTypeName", _context.ServiceTypeName }, { "ReplicaOrInstanceId", _context.InstanceId.ToString() }, { "PartitionId", _context.PartitionId.ToString() }, { "ApplicationName", _context.CodePackageActivationContext.ApplicationName }, { "ApplicationTypeName", _context.CodePackageActivationContext.ApplicationTypeName }, { "NodeName", _context.NodeContext.NodeName }, { "ServiceRemotingMessageHeaders", serviceRemotingMessageHeaders.ToString() }, { "Message", ex.Message }, { "Source", ex.Source }, { "ExceptionTypeName", ex.GetType().FullName }, { "Exception", ex.AsJson() } }); }
public void RecieveServiceMessageFailed( System.Fabric.StatefulServiceContext context, System.Uri requestUri, string serviceMethodName, Microsoft.ServiceFabric.Services.Remoting.ServiceRemotingMessageHeaders serviceMessageHeaders, FG.ServiceFabric.Services.Remoting.FabricTransport.CustomServiceRequestHeader customServiceRequestHeader, System.Exception ex) { if (this.IsEnabled()) { RecieveServiceMessageFailed( context.ServiceName.ToString(), context.ServiceTypeName, context.ReplicaOrInstanceId, context.PartitionId, context.CodePackageActivationContext.ApplicationName, context.CodePackageActivationContext.ApplicationTypeName, context.NodeContext.NodeName, requestUri.ToString(), serviceMethodName, (serviceMessageHeaders?.InterfaceId ?? 0), (serviceMessageHeaders?.MethodId ?? 0), customServiceRequestHeader?.GetHeader("userId"), customServiceRequestHeader?.GetHeader("correlationId"), ex.Message, ex.Source, ex.GetType().FullName, ex.AsJson()); } }
public void ActorHostInitializationFailed( System.Exception ex) { PersonActorServiceEventSource.Current.ActorHostInitializationFailed( _actor, ex ); _telemetryClient.TrackException( ex, new System.Collections.Generic.Dictionary <string, string>() { { "Name", "ActorHostInitializationFailed" }, { "ActorType", _actor.ActorType.ToString() }, { "ActorId", _actor.ActorId.ToString() }, { "ApplicationTypeName", _actor.ApplicationTypeName }, { "ApplicationName", _actor.ApplicationName }, { "ServiceTypeName", _actor.ServiceTypeName }, { "ServiceName", _actor.ToString() }, { "PartitionId", _actor.PartitionId.ToString() }, { "ReplicaOrInstanceId", _actor.ReplicaOrInstanceId.ToString() }, { "NodeName", _actor.NodeName }, { "Message", ex.Message }, { "Source", ex.Source }, { "ExceptionTypeName", ex.GetType().FullName }, { "Exception", ex.AsJson() } }); }
public void FailedRequestContext( System.Collections.Generic.IEnumerable <CodeEffect.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestHeader> headers, System.Exception exception) { WebApiServiceEventSource.Current.FailedRequestContext( _context, headers, exception ); _telemetryClient.TrackException( exception, new System.Collections.Generic.Dictionary <string, string>() { { "Name", "FailedRequestContext" }, { "ServiceName", _context.ServiceName.ToString() }, { "ServiceTypeName", _context.ServiceTypeName }, { "ReplicaOrInstanceId", _context.InstanceId.ToString() }, { "PartitionId", _context.PartitionId.ToString() }, { "ApplicationName", _context.CodePackageActivationContext.ApplicationName }, { "ApplicationTypeName", _context.CodePackageActivationContext.ApplicationTypeName }, { "NodeName", _context.NodeContext.NodeName }, { "Headers", headers.ToString() }, { "Message", exception.Message }, { "Source", exception.Source }, { "ExceptionTypeName", exception.GetType().FullName }, { "Exception", exception.AsJson() } }); }
public void FailedToEnumeratePartitions( System.Uri serviceUri, System.Exception ex) { WebApiServiceEventSource.Current.FailedToEnumeratePartitions( _context, serviceUri, ex ); _telemetryClient.TrackException( ex, new System.Collections.Generic.Dictionary <string, string>() { { "Name", "FailedToEnumeratePartitions" }, { "ServiceName", _context.ServiceName.ToString() }, { "ServiceTypeName", _context.ServiceTypeName }, { "ReplicaOrInstanceId", _context.InstanceId.ToString() }, { "PartitionId", _context.PartitionId.ToString() }, { "ApplicationName", _context.CodePackageActivationContext.ApplicationName }, { "ApplicationTypeName", _context.CodePackageActivationContext.ApplicationTypeName }, { "NodeName", _context.NodeContext.NodeName }, { "ServiceUri", serviceUri.ToString() }, { "Message", ex.Message }, { "Source", ex.Source }, { "ExceptionTypeName", ex.GetType().FullName }, { "Exception", ex.AsJson() } }); }
public void FailedToGetServiceMethodName( System.Fabric.StatefulServiceContext context, System.Uri requestUri, int interfaceId, int methodId, System.Exception ex) { if (this.IsEnabled()) { FailedToGetServiceMethodName( context.ServiceName.ToString(), context.ServiceTypeName, context.ReplicaOrInstanceId, context.PartitionId, context.CodePackageActivationContext.ApplicationName, context.CodePackageActivationContext.ApplicationTypeName, context.NodeContext.NodeName, requestUri.ToString(), interfaceId, methodId, ex.Message, ex.Source, ex.GetType().FullName, ex.AsJson()); } }
public void RunAsyncLoopFailed( Microsoft.ServiceFabric.Actors.Runtime.ActorService actorService, FG.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestContext context, System.Exception ex) { if (this.IsEnabled()) { RunAsyncLoopFailed( actorService.ActorTypeInformation.ImplementationType.ToString(), actorService.Context.CodePackageActivationContext.ApplicationTypeName, actorService.Context.CodePackageActivationContext.ApplicationName, actorService.Context.ServiceTypeName, actorService.Context.ServiceName.ToString(), actorService.Context.PartitionId, actorService.Context.ReplicaId, actorService.Context.NodeContext.NodeName, FG.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestContext.Current?["correlationId"], FG.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestContext.Current?["userId"], FG.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestContext.Current?["requestUri"], ex.Message, ex.Source, ex.GetType().FullName, ex.AsJson()); } }
private void TrapError(Exception error, HttpContext context) { if (_selfSourceId == null) { lock (this) { if (_selfSourceId == null) { _selfSourceId = GlobalHost.DependencyResolver.Resolve<IApplications>().SelfSourceId ?? Error.ElmahRSourceId; } } } var jsonified = error.AsJson(context); Hub.Log(string.Format("An error occurred in ElmahR: {0}", error), Hub.Severity.Critical); Error.ProcessAndAppendError( _selfSourceId, Guid.NewGuid().ToString(), jsonified, string.Empty, ex => { Hub.Log(string.Format("An error occurred while processing an internal error in ElmahR: {0}", error), Hub.Severity.Critical); Error.ProcessError( Error.ElmahRSourceId, ex, String.Empty, _ => { }, true); }); }
public void UnsupportedKeyError( System.Exception ex) { if (this.IsEnabled()) { UnsupportedKeyError( ex.Message, ex.Source, ex.GetType().FullName, ex.AsJson()); } }
public void Error( System.Exception exception) { if (this.IsEnabled()) { Error( exception.Message, exception.Source, exception.GetType().FullName, exception.AsJson()); } }
public void Error( System.Exception exception) { Sample.Current.Error( exception ); System.Diagnostics.Debug.WriteLine($"[Console, Error] ERR: Error"); System.Diagnostics.Debug.WriteLine($"\texception.Message:\t{exception.Message}"); System.Diagnostics.Debug.WriteLine($"\texception.Source:\t{exception.Source}"); System.Diagnostics.Debug.WriteLine($"\texception.GetType().FullName:\t{exception.GetType().FullName}"); System.Diagnostics.Debug.WriteLine($"\texception.AsJson():\t{exception.AsJson()}"); _telemetryClient.TrackException( exception, new System.Collections.Generic.Dictionary <string, string>() { { "Name", "Error" }, { "Message", exception.Message }, { "Source", exception.Source }, { "ExceptionTypeName", exception.GetType().FullName }, { "Exception", exception.AsJson() } }); }
public void Error( bool autogenerated, string machineName, System.Exception exception) { if (this.IsEnabled()) { Error( autogenerated, Environment.MachineName, exception.Message, exception.Source, exception.GetType().FullName, exception.AsJson()); } }
public void StandaloneTestFailed( int processId, Guid correlationId, System.Exception exception) { if (this.IsEnabled()) { StandaloneTestFailed( processId, correlationId, exception.Message, exception.Source, exception.GetType().FullName, exception.AsJson()); } }
public void UnsupportedKeyError( int processId, string machineName, Microsoft.ServiceFabric.Actors.ActorId actorId, System.Exception ex) { if (this.IsEnabled()) { UnsupportedKeyError( processId, Environment.MachineName, actorId.ToString(), ex.Message, ex.Source, ex.GetType().FullName, ex.AsJson()); } }
public void Error( Microsoft.ServiceFabric.Actors.ActorId actorId, int processId, string machineName, System.Exception exception) { if (this.IsEnabled()) { Error( actorId.ToString(), actorId.Kind.ToString(), processId, Environment.MachineName, exception.Message, exception.Source, exception.GetType().FullName, exception.AsJson()); } }
public void CallServiceFailed( System.Uri requestUri, string serviceMethodName, Microsoft.ServiceFabric.Services.Remoting.ServiceRemotingMessageHeaders serviceMessageHeaders, FG.ServiceFabric.Services.Remoting.FabricTransport.CustomServiceRequestHeader customServiceRequestHeader, System.Exception ex) { PersonActorServiceEventSource.Current.CallServiceFailed( _actor, requestUri, serviceMethodName, serviceMessageHeaders, customServiceRequestHeader, ex ); _telemetryClient.TrackException( ex, new System.Collections.Generic.Dictionary <string, string>() { { "Name", "CallServiceFailed" }, { "ActorType", _actor.ActorType.ToString() }, { "ActorId", _actor.ActorId.ToString() }, { "ApplicationTypeName", _actor.ApplicationTypeName }, { "ApplicationName", _actor.ApplicationName }, { "ServiceTypeName", _actor.ServiceTypeName }, { "ServiceName", _actor.ToString() }, { "PartitionId", _actor.PartitionId.ToString() }, { "ReplicaOrInstanceId", _actor.ReplicaOrInstanceId.ToString() }, { "NodeName", _actor.NodeName }, { "RequestUri", requestUri.ToString() }, { "ServiceMethodName", serviceMethodName }, { "InterfaceId", (serviceMessageHeaders?.InterfaceId ?? 0).ToString() }, { "MethodId", (serviceMessageHeaders?.MethodId ?? 0).ToString() }, { "UserId", customServiceRequestHeader?.GetHeader("userId") }, { "CorrelationId", customServiceRequestHeader?.GetHeader("correlationId") }, { "Message", ex.Message }, { "Source", ex.Source }, { "ExceptionTypeName", ex.GetType().FullName }, { "Exception", ex.AsJson() } }); }
public void ActorHostInitializationFailed( FG.ServiceFabric.Diagnostics.ActorOrActorServiceDescription actor, System.Exception ex) { if (this.IsEnabled()) { ActorHostInitializationFailed( actor.ActorType.ToString(), actor.ActorId.ToString(), actor.ApplicationTypeName, actor.ApplicationName, actor.ServiceTypeName, actor.ToString(), actor.PartitionId, actor.ReplicaOrInstanceId, actor.NodeName, ex.Message, ex.Source, ex.GetType().FullName, ex.AsJson()); } }
public void FailedRequestContext( System.Fabric.StatefulServiceContext context, System.Collections.Generic.IEnumerable <FG.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestHeader> headers, System.Exception exception) { if (this.IsEnabled()) { FailedRequestContext( context.ServiceName.ToString(), context.ServiceTypeName, context.ReplicaOrInstanceId, context.PartitionId, context.CodePackageActivationContext.ApplicationName, context.CodePackageActivationContext.ApplicationTypeName, context.NodeContext.NodeName, headers.ToString(), exception.Message, exception.Source, exception.GetType().FullName, exception.AsJson()); } }
public void FailedToEnumeratePartitions( System.Fabric.StatefulServiceContext context, System.Uri serviceUri, System.Exception ex) { if (this.IsEnabled()) { FailedToEnumeratePartitions( context.ServiceName.ToString(), context.ServiceTypeName, context.ReplicaOrInstanceId, context.PartitionId, context.CodePackageActivationContext.ApplicationName, context.CodePackageActivationContext.ApplicationTypeName, context.NodeContext.NodeName, serviceUri.ToString(), ex.Message, ex.Source, ex.GetType().FullName, ex.AsJson()); } }
public void UnsupportedKeyError( System.Exception ex) { DefaultEventSource.Current.UnsupportedKeyError( _processId, _machineName, _actorId, ex ); _telemetryClient.TrackException( ex, new System.Collections.Generic.Dictionary <string, string>() { { "Name", "UnsupportedKeyError" }, { "ProcessId", _processId.ToString() }, { "MachineName", Environment.MachineName }, { "Actor", _actorId.ToString() }, { "Message", ex.Message }, { "Source", ex.Source }, { "ExceptionTypeName", ex.GetType().FullName }, { "Exception", ex.AsJson() } }); }
public static Error ProcessError(string sourceId, Exception ex, string infoUrlPath, Action<Exception> errorCatcher, bool synthetic = false) { return Process(sourceId, infoUrlPath, source => { var jsonError = ex.AsJson(null); var errorId = Guid.NewGuid().ToString(); return Build(jsonError, errorId, source); }, synthetic); }