trace

WCF: How do I trace message bodies?

夙愿已清 提交于 2019-12-05 22:16:54
问题 I'm trying to diagnose a WCF service that is self-hosted in a relatively simple service host process (Service.exe). I have Service.exe.config configured thus: <?xml version="1.0" ?> <configuration> <system.diagnostics> <sources> <source name="System.ServiceModel" switchValue="All" propagateActivity="true"> <listeners> <add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData= "c:\temp\Service.svclog" /> </listeners> </source> </sources> </system.diagnostics>

TraceSwitch and SourceSwitch - what's the difference?

爱⌒轻易说出口 提交于 2019-12-05 19:39:56
问题 So I'm probably missing the obvious here, but what actually is the difference between the functionality of the TraceSwitch and SourceSwitch classes? They both give identical summary descriptions: Provides a multilevel switch to control tracing and debug output without recompiling your code. Are the Remarks sections are oddly similar to my eyes. Could someone please clarify the difference in their functionality and usage cases? (For completeness, I'm using switches with my TraceSource object,

TextWriterTraceListener does not work

走远了吗. 提交于 2019-12-05 19:05:31
Config file: <system.diagnostics> <trace> <listeners> <add name="Console" type="System.Diagnostics.ConsoleTraceListener" initializeData="false"></add> <add name="Text" type="System.Diagnostics.TextWriterTraceListener" initializeData="D:\uat\logs\bifit.log" traceOutputOptions="DateTime"></add> </listeners> </trace> </system.diagnostics> The code: static void Main(string[] args) { try { Trace.WriteLine("Running BiFit Test Server."); } } I can see the text in cosole window. And the file is created, but it empty. I remember there is something like Autoflush property somewhere? You recall correctly

The go 1.5 trace command

≡放荡痞女 提交于 2019-12-05 18:25:17
问题 The Go 1.5 release note says, The new "go tool trace" command enables the visualisation of program traces generated by new tracing infrastructure in the runtime. This is really exciting, and I want to know more about it. But its official document at https://golang.org/cmd/trace/ is really dry. Found that Rob Pike complained about it, requesting that "shortly after the 1.5 release, there should be a blog post about the feature." If anyone has posted/spotted such a blog, please add a link here.

How can I get a trace ID from OpenTracing API?

喜你入骨 提交于 2019-12-05 17:41:22
In #105 davidB asks: I would like to have read access to the Span id (SpanContext id) to be able to use it in log and in error reported (to end user,...). [skip] I need to expose the "trace id" in error message, then dev could use the trace to debug error reported by support, QA, end-user. At the moment the OpenTracing API does not expose trace ID. It is being discussed in this issue: https://github.com/opentracing/specification/issues/24 One thing you can do right now is to call tracer.inject(null, Builtin.HTTP_HEADERS, map . It will put all IDs with baggage (SpanContext) into the map. Then

How to log and trace NodeJS Events and Event handlers invocation?

青春壹個敷衍的年華 提交于 2019-12-05 15:59:05
Is there any way to log All other Registered Event handlers when an event handler gets registered? Also Is there any way to log All Events emitted, and name of handler functions that gets triggered in when an event gets emitted during runtime? If the nodejs application triggers chained events (one event triggering another ) and each event has multiple handlers, when exception occurs at leaf of event-handler-chain, stacktrace does not show complete information of the context. Event log and handler info would be quite useful in such a situation. One hackey solution is to add (conditional)

Nested multithread operations tracing

这一生的挚爱 提交于 2019-12-05 14:35:36
I've a code alike void ExecuteTraced(Action a, string message) { TraceOpStart(message); a(); TraceOpEnd(message); } The callback (a) could call ExecuteTraced again, and, in some cases, asynchronously (via ThreadPool, BeginInvoke, PLINQ etc, so I've no ability to explicitly mark operation scope). I want to trace all operation nested (even if they perform asynchronously). So, I need the ability to get last traced operation inside logical call context (there may be a lot of concurrent threads, so it's impossible to use lastTraced static field). There're CallContext.LogicalGetData and CallContext

How can I stop IISExpress from dumping every detail of every request into the Visual Studio Output window?

时光总嘲笑我的痴心妄想 提交于 2019-12-05 12:25:12
问题 My VS 2013 output window is full of this: iisexpress.exe Information: 0 : Request, Method=GET, Url=http://localhost:51741/api/Clients/?$filter=UniqueName eq '6269', Message='http://localhost:51741/api/Clients/?$filter=UniqueName eq '6269'' iisexpress.exe Information: 0 : Message='Clients', Operation=DefaultHttpControllerSelector.SelectController iisexpress.exe Information: 0 : Message='MyProj.Controllers.ClientsController', Operation=DefaultHttpControllerActivator.Create iisexpress.exe

Tracing the action of consuming messages from mailbox in Erlang

♀尐吖头ヾ 提交于 2019-12-05 10:14:05
I went through the documentation of the trace/3 BIF in Erlang. However, one observation I have made is that it cannot be used for tracing the consuming of messages from the mailbox. The flag 'receive' only traces when messages are added to a process's mailbox. Is there any way one can trace events such as reading from the mailbox using the receive construct? If not, is there any reason why this isn't possible? It seems very strange that one can trace most kind of events in a program and the reading of messages from a mailbox is not traceable. There is no such tool. You can only hope for call

IIS Failed Request Tracing - Performance View - doesn't show time spent

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 08:21:38
I'm trying to troubleshoot slows requests on a website so I have configured Failed Request Tracing to trigger for requests taking 10 seconds or more. I'm getting logs but though they take 10+ seconds the performance view tab doesn't show where the time is spent. Why is that? I have the same problem and it seems that IIS Time Taken logs are saved only up-to point when the request exceeds threshold. When I set up tracing based on status code, it will always log all events in .xml file. Try to create trace based on Status code (200) and compare tail of .xml with tail of "Time Taken" .xml and you