コード例 #1
0
        /// <summary>
        /// Gets trace definition like: WAS connection timed out.
        /// Event description ID=4032, Level=Critical, Channel=Analytic
        /// </summary>
        /// <param name="eventTraceActivity">The event trace activity</param>
        internal static void WasConnectionTimedout(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);

            if (TD.IsEtwEventEnabled(24))
            {
                TD.WriteEtwEvent(24, eventTraceActivity, payload.AppDomainFriendlyName);
            }
        }
コード例 #2
0
        /// <summary>
        /// Gets trace definition like: Transport listener session received with via '{0}'
        /// Event description ID=4001, Level=Verbose, Channel=Analytic
        /// </summary>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="via">Parameter 0 for event: Transport listener session received with via '{0}'</param>
        internal static void TransportListenerSessionsReceived(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, string via)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);

            if (TD.IsEtwEventEnabled(0))
            {
                TD.WriteEtwEvent(0, eventTraceActivity, via, payload.AppDomainFriendlyName);
            }
        }
コード例 #3
0
        /// <summary>
        /// Gets trace definition like: Was closing all listener channel instances completed.
        /// Event description ID=4023, Level=Informational, Channel=Analytic
        /// </summary>
        /// <param name="eventTraceActivity">The event trace activity</param>
        internal static void WasCloseAllListenerChannelInstancesCompleted(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);

            if (TD.IsEtwEventEnabled(15))
            {
                TD.WriteEtwEvent(15, eventTraceActivity, payload.AppDomainFriendlyName);
            }
        }
コード例 #4
0
        /// <summary>
        /// Gets trace definition like: Pipe transport listener listening stop.
        /// Event description ID=4029, Level=Verbose, Channel=Analytic
        /// </summary>
        /// <param name="eventTraceActivity">The event trace activity</param>
        internal static void PipeTransportListenerListeningStop(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);

            if (TD.IsEtwEventEnabled(21))
            {
                TD.WriteEtwEvent(21, eventTraceActivity, payload.AppDomainFriendlyName);
            }
        }
コード例 #5
0
        /// <summary>
        /// Gets trace definition like: Message queue unregister succeeded for uri:'{0}'.
        /// Event description ID=4013, Level=verbose, Channel=Analytic
        /// </summary>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="Uri">Parameter 0 for event: Message queue unregister succeeded for uri:'{0}'.</param>
        internal static void MessageQueueUnregisterSucceeded(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, string Uri)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);

            if (TD.IsEtwEventEnabled(9))
            {
                TD.WriteEtwEvent(9, eventTraceActivity, Uri, payload.AppDomainFriendlyName);
            }
        }
コード例 #6
0
        /// <summary>
        /// Gets trace definition like: Tcp transport listener starting to listen on uri:'{0}'.
        /// Event description ID=4020, Level=Verbose, Channel=Analytic
        /// </summary>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="Uri">Parameter 0 for event: Tcp transport listener starting to listen on uri:'{0}'.</param>
        internal static void TcpTransportListenerListeningStart(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, string Uri)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);

            if (TD.IsEtwEventEnabled(12))
            {
                TD.WriteEtwEvent(12, eventTraceActivity, Uri, payload.AppDomainFriendlyName);
            }
        }
コード例 #7
0
        internal static void MessageSentToTransport(Guid CorrelationId)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null, true);

            if (IsEtwEventEnabled(0x1d))
            {
                WriteEtwEvent(0x1d, CorrelationId, payload.HostReference, payload.AppDomainFriendlyName);
            }
        }
コード例 #8
0
        /// <summary>
        /// Gets trace definition like: Message queue register start.
        /// Event description ID=4011, Level=Verbose, Channel=Analytic
        /// </summary>
        /// <param name="eventTraceActivity">The event trace activity</param>
        internal static void MessageQueueRegisterStart(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);

            if (TD.IsEtwEventEnabled(5))
            {
                TD.WriteEtwEvent(5, eventTraceActivity, payload.AppDomainFriendlyName);
            }
        }
コード例 #9
0
        internal static void MessageReceivedFromTransport(Guid CorrelationId, string reference)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);

            if (IsEtwEventEnabled(0x1c))
            {
                WriteEtwEvent(0x1c, CorrelationId, reference, payload.AppDomainFriendlyName);
            }
        }
コード例 #10
0
        internal static void MessageSentByTransport(string DestinationAddress)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null, true);

            if (IsEtwEventEnabled(15))
            {
                WriteEtwEvent(15, DestinationAddress, payload.HostReference, payload.AppDomainFriendlyName);
            }
        }
コード例 #11
0
        internal static void MessageReceivedByTransport(string ListenAddress)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null, true);

            if (IsEtwEventEnabled(14))
            {
                WriteEtwEvent(14, ListenAddress, payload.HostReference, payload.AppDomainFriendlyName);
            }
        }
コード例 #12
0
        internal static void MessageLogEventSizeExceeded()
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);

            if (IsEtwEventEnabled(0x12))
            {
                WriteEtwEvent(0x12, payload.AppDomainFriendlyName);
            }
        }
コード例 #13
0
        internal static void MessageInspectorBeforeSendInvoked(string TypeName)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null, true);

            if (IsEtwEventEnabled(9))
            {
                WriteEtwEvent(9, TypeName, payload.HostReference, payload.AppDomainFriendlyName);
            }
        }
コード例 #14
0
        /// <summary>
        /// Gets trace definition like: Service start pipe error.
        /// Event description ID=4003, Level=Error, Channel=Analytic
        /// </summary>
        /// <param name="Endpoint">Parameter 0 for event: Service start pipe error.</param>
        internal static void ServiceStartPipeError(string Endpoint)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);

            if (TD.IsEtwEventEnabled(2))
            {
                TD.WriteEtwEvent(2, null, Endpoint, payload.AppDomainFriendlyName);
            }
        }
コード例 #15
0
        internal static void MessageThrottleExceeded(string ThrottleName, long Limit)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null, true);

            if (IsEtwEventEnabled(10))
            {
                WriteEtwEvent(10, ThrottleName, Limit, payload.HostReference, payload.AppDomainFriendlyName);
            }
        }
コード例 #16
0
        internal static void FaultProviderInvoked(string TypeName, string ExceptionTypeName)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null, true);

            if (IsEtwEventEnabled(7))
            {
                WriteEtwEvent(7, TypeName, ExceptionTypeName, payload.HostReference, payload.AppDomainFriendlyName);
            }
        }
コード例 #17
0
        internal static void OperationFaulted(string MethodName, long Duration)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null, true);

            if (IsEtwEventEnabled(0x1a))
            {
                WriteEtwEvent(0x1a, MethodName, Duration, payload.HostReference, payload.AppDomainFriendlyName);
            }
        }
コード例 #18
0
        /// <summary>
        /// Gets trace definition like: Message queue registration for uri:'{0}' failed with status:'{1}'.
        /// Event description ID=4014, Level=Error, Channel=Analytic
        /// </summary>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="Uri">Parameter 0 for event: Message queue registration for uri:'{0}' failed with status:'{1}'.</param>
        /// <param name="Status">Parameter 1 for event: Message queue registration for uri:'{0}' failed with status:'{1}'.</param>
        internal static void MessageQueueRegisterFailed(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, string Uri, string Status)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);

            if (TD.IsEtwEventEnabled(6))
            {
                TD.WriteEtwEvent(6, eventTraceActivity, Uri, Status, payload.AppDomainFriendlyName);
            }
        }
コード例 #19
0
        internal static void OperationInvoked(string MethodName, string CallerInfo)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null, true);

            if (IsEtwEventEnabled(5))
            {
                WriteEtwEvent(5, MethodName, CallerInfo, payload.HostReference, payload.AppDomainFriendlyName);
            }
        }
コード例 #20
0
        /// <summary>
        /// Gets trace definition like: MessageQueueDuplicatedSocketComplete
        /// Event description ID=4019, Level=Verbose, Channel=Analytic
        /// </summary>
        /// <param name="eventTraceActivity">The event trace activity</param>
        internal static void MessageQueueDuplicatedSocketComplete(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);

            if (TD.IsEtwEventEnabled(11))
            {
                TD.WriteEtwEvent(11, eventTraceActivity, payload.AppDomainFriendlyName);
            }
        }
コード例 #21
0
        internal static void ServiceException(string ExceptionToString, string ExceptionTypeName)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null, true);

            if (IsEtwEventEnabled(0x18))
            {
                WriteEtwEvent(0x18, ExceptionToString, ExceptionTypeName, payload.HostReference, payload.AppDomainFriendlyName);
            }
        }
コード例 #22
0
        /// <summary>
        /// Gets trace definition like: Error Code:{0}
        /// Event description ID=4022, Level=Error, Channel=Analytic
        /// </summary>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="hresult">Parameter 0 for event: Error Code:{0}</param>
        internal static void WebhostUnregisterProtocolFailed(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, string hresult)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);

            if (TD.IsEtwEventEnabled(14))
            {
                TD.WriteEtwEvent(14, eventTraceActivity, hresult, payload.AppDomainFriendlyName);
            }
        }
コード例 #23
0
        internal static void SuspendSignpostEvent(TraceRecord traceRecord)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, traceRecord, null);

            if (IsEtwEventEnabled(0x16))
            {
                WriteEtwEvent(0x16, payload.ExtendedData, payload.AppDomainFriendlyName);
            }
        }
コード例 #24
0
        /// <summary>
        /// Gets trace definition like: Error Code:{0}
        /// Event description ID=4025, Level=Error, Channel=Analytic
        /// </summary>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="hresult">Parameter 0 for event: Error Code:{0}</param>
        internal static void OpenListenerChannelInstanceFailed(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, string hresult)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);

            if (TD.IsEtwEventEnabled(17))
            {
                TD.WriteEtwEvent(17, eventTraceActivity, hresult, payload.AppDomainFriendlyName);
            }
        }
コード例 #25
0
        internal static void ClientOperationPrepared(string Action, string ContractName, string Destination)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null, true);

            if (IsEtwEventEnabled(0))
            {
                WriteEtwEvent(0, Action, ContractName, Destination, payload.HostReference, payload.AppDomainFriendlyName);
            }
        }
コード例 #26
0
        /// <summary>
        /// Gets trace definition like: Session dispatch failed.
        /// Event description ID=4031, Level=Error, Channel=Analytic
        /// </summary>
        /// <param name="eventTraceActivity">The event trace activity</param>
        internal static void DispatchSessionFailed(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);

            if (TD.IsEtwEventEnabled(23))
            {
                TD.WriteEtwEvent(23, eventTraceActivity, payload.AppDomainFriendlyName);
            }
        }
コード例 #27
0
        internal static void ClientParameterInspectorBeforeCallInvoked(string TypeName)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null, true);

            if (IsEtwEventEnabled(4))
            {
                WriteEtwEvent(4, TypeName, payload.HostReference, payload.AppDomainFriendlyName);
            }
        }
コード例 #28
0
        /// <summary>
        /// Gets trace definition like: Routing table lookup completed.
        /// Event description ID=4034, Level=Verbose, Channel=Debug
        /// </summary>
        internal static void RoutingTableLookupStop()
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);

            if (TD.IsEtwEventEnabled(26))
            {
                TD.WriteEtwEvent(26, null, payload.AppDomainFriendlyName);
            }
        }
コード例 #29
0
        /// <summary>
        /// Gets trace definition like: Session dispatch for '{0}' failed since pending session queue is full with '{1}' pending items.
        /// Event description ID=4010, Level=Warning, Channel=Analytic
        /// </summary>
        /// <param name="eventTraceActivity">The event trace activity</param>
        /// <param name="Uri">Parameter 0 for event: Session dispatch for '{0}' failed since pending session queue is full with '{1}' pending items.</param>
        /// <param name="count">Parameter 1 for event: Session dispatch for '{0}' failed since pending session queue is full with '{1}' pending items.</param>
        internal static void PendingSessionQueueFull(System.Runtime.Diagnostics.EventTraceActivity eventTraceActivity, string Uri, int count)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null);

            if (TD.IsEtwEventEnabled(4))
            {
                TD.WriteEtwEvent(4, eventTraceActivity, Uri, count, payload.AppDomainFriendlyName);
            }
        }
コード例 #30
0
        internal static void ErrorHandlerInvoked(string TypeName, bool Handled, string ExceptionTypeName)
        {
            TracePayload payload = FxTrace.Trace.GetSerializedPayload(null, null, null, true);

            if (IsEtwEventEnabled(6))
            {
                WriteEtwEvent(6, TypeName, Handled, ExceptionTypeName, payload.HostReference, payload.AppDomainFriendlyName);
            }
        }
コード例 #31
0
        public void WriteTraceSource(ref EventDescriptor eventDescriptor, string description, TracePayload payload)
        {
            if (this.TracingEnabled)
            {
                XPathNavigator navigator = null;
                try
                {
                    string msdnTraceCode;
                    int legacyEventId;
                    EtwDiagnosticTrace.GenerateLegacyTraceCode(ref eventDescriptor, out msdnTraceCode, out legacyEventId);

                    string traceString = BuildTrace(ref eventDescriptor, description, payload, msdnTraceCode);
                    XmlDocument traceDocument = new XmlDocument();
                    traceDocument.LoadXml(traceString);
                    navigator = traceDocument.CreateNavigator();
                    this.TraceSource.TraceData(TraceLevelHelper.GetTraceEventType(eventDescriptor.Level, eventDescriptor.Opcode), legacyEventId, navigator);

                    if (this.CalledShutdown)
                    {
                        this.TraceSource.Flush();
                    }
                }
                catch (Exception exception)
                {
                    if (Fx.IsFatal(exception))
                    {
                        throw;
                    }

                    LogTraceFailure(navigator == null ? string.Empty : navigator.ToString(), exception);
                }
            }
        }
コード例 #32
0
        static string BuildTrace(ref EventDescriptor eventDescriptor, string description, TracePayload payload, string msdnTraceCode)
        {
            StringBuilder sb = StringBuilderPool.Take();
            try
            {
                using (StringWriter stringWriter = new StringWriter(sb, CultureInfo.CurrentCulture))
                {
                    using (XmlTextWriter writer = new XmlTextWriter(stringWriter))
                    {
                        writer.WriteStartElement(DiagnosticStrings.TraceRecordTag);
                        writer.WriteAttributeString(DiagnosticStrings.NamespaceTag, EtwDiagnosticTrace.TraceRecordVersion);
                        writer.WriteAttributeString(DiagnosticStrings.SeverityTag,
                            TraceLevelHelper.LookupSeverity((TraceEventLevel)eventDescriptor.Level, (TraceEventOpcode)eventDescriptor.Opcode));
                        writer.WriteAttributeString(DiagnosticStrings.ChannelTag, EtwDiagnosticTrace.LookupChannel((TraceChannel)eventDescriptor.Channel));

                        writer.WriteElementString(DiagnosticStrings.TraceCodeTag, msdnTraceCode);
                        writer.WriteElementString(DiagnosticStrings.DescriptionTag, description);
                        writer.WriteElementString(DiagnosticStrings.AppDomain, payload.AppDomainFriendlyName);

                        if (!string.IsNullOrEmpty(payload.EventSource))
                        {
                            writer.WriteElementString(DiagnosticStrings.SourceTag, payload.EventSource);
                        }

                        if (!string.IsNullOrEmpty(payload.ExtendedData))
                        {
                            writer.WriteRaw(payload.ExtendedData);
                        }

                        if (!string.IsNullOrEmpty(payload.SerializedException))
                        {
                            writer.WriteRaw(payload.SerializedException);
                        }

                        writer.WriteEndElement();
                        writer.Flush();
                        stringWriter.Flush();

                        return sb.ToString();
                    }
                }
            }
            finally
            {
                StringBuilderPool.Return(sb);
            }
        }
コード例 #33
0
ファイル: EtwDiagnosticTrace.cs プロジェクト: weshaggard/wcf
 public void WriteTraceSource(ref EventDescriptor eventDescriptor, string description, TracePayload payload)
 {
 }