<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Windows high speed logging: ETW in C#/.NET using System.Diagnostics.Tracing.EventSource </title><link>http://blogs.msdn.com/b/vancem/archive/2012/08/13/windows-high-speed-logging-etw-in-c-net-using-system-diagnostics-tracing-eventsource.aspx</link><description>In my introduction to EventSource posting and my posting of the EventSource specification , I tried to give you the 'quick start' for using EventSource to generate ETW events from C# (or any .NET language). 
 In this posting I would like to back a bit</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Windows high speed logging: ETW in C#/.NET using System.Diagnostics.Tracing.EventSource </title><link>http://blogs.msdn.com/b/vancem/archive/2012/08/13/windows-high-speed-logging-etw-in-c-net-using-system-diagnostics-tracing-eventsource.aspx#10410803</link><pubDate>Sat, 13 Apr 2013 08:48:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10410803</guid><dc:creator>asava samuel</dc:creator><description>&lt;p&gt;This logger works really well:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.kellermansoftware.com/p-14-net-logging-library.aspx"&gt;www.kellermansoftware.com/p-14-net-logging-library.aspx&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10410803" width="1" height="1"&gt;</description></item><item><title>re: Windows high speed logging: ETW in C#/.NET using System.Diagnostics.Tracing.EventSource </title><link>http://blogs.msdn.com/b/vancem/archive/2012/08/13/windows-high-speed-logging-etw-in-c-net-using-system-diagnostics-tracing-eventsource.aspx#10391499</link><pubDate>Wed, 06 Feb 2013 12:33:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10391499</guid><dc:creator>Andrey Tamelo</dc:creator><description>&lt;p&gt;Thanks a lot for bringing this topic up! These posts make a lot to finally convince one of our customers that ETW is the way to go for tracing (the perf figures and other stuff look very compelling).&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10391499" width="1" height="1"&gt;</description></item><item><title>re: Windows high speed logging: ETW in C#/.NET using System.Diagnostics.Tracing.EventSource </title><link>http://blogs.msdn.com/b/vancem/archive/2012/08/13/windows-high-speed-logging-etw-in-c-net-using-system-diagnostics-tracing-eventsource.aspx#10386685</link><pubDate>Sun, 20 Jan 2013 22:56:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10386685</guid><dc:creator>Vance Morrison</dc:creator><description>&lt;p&gt;As Sreeni has discovered, EventSource and EventListener are designed to work in the same process (actually the same Appdomain in the same process), &amp;nbsp; Thus you can&amp;#39;t have a EventSource in one process and communicate with it with an EventListener in another process. &amp;nbsp;That was not the goal of EventListener. &amp;nbsp; EventSource was designed to hook nicely into the Window ETW system, however. what if you wanted strongly typed logging but for whatever reason did not wish to use ETW? &amp;nbsp; For that you would need a &amp;#39;hook&amp;#39; that allows you to get at the all the events generated by your EventSources, so that you could send the log event data wherever you wanted (file, database, console ...) this is what EventListener does. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;For cross-process logging of events, you have two possibilities&lt;/p&gt;
&lt;p&gt;1) Use the built in support EventSource has for ETW, and use ETW as your cross-process communication mechanism. &amp;nbsp;The is effectively what the example &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/b/vancem/archive/2012/12/20/and-end-to-end-etw-tracing-example-eventsource-and-traceevent.aspx"&gt;blogs.msdn.com/.../and-end-to-end-etw-tracing-example-eventsource-and-traceevent.aspx&lt;/a&gt; does (this example happens to do it in one process for simplicity, but hopefully it is obvious how you would make two processes). &amp;nbsp; &lt;/p&gt;
&lt;p&gt;2) Use EventListener in the process with the EventSources to get the eventSTream, and build your own cross-process communication path you want (e.g a pipe). &amp;nbsp;Note that it non-trivial to keep the events &amp;#39;strongly typed&amp;#39; so I don&amp;#39;t recommend this unless option (1) can&amp;#39;t be made to work (e.g. you have a phone or slate app and you want to log your events on your hosting machine). &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10386685" width="1" height="1"&gt;</description></item><item><title>re: Windows high speed logging: ETW in C#/.NET using System.Diagnostics.Tracing.EventSource </title><link>http://blogs.msdn.com/b/vancem/archive/2012/08/13/windows-high-speed-logging-etw-in-c-net-using-system-diagnostics-tracing-eventsource.aspx#10386587</link><pubDate>Sun, 20 Jan 2013 03:04:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10386587</guid><dc:creator>Sreeni</dc:creator><description>&lt;p&gt;I tried to split the producer and consumer in EventSource demo. Interesting thing is, EventListener.EnableEvents (myListener0.EnableEvents(MinimalEventSource.Log, EventLevel.Verbose)) is taking EventSource&amp;#39;s instance as input. As producer&amp;#39;s instance and consumer&amp;#39;s instance are different, consumer/listener is not receiving any events. Could you share a sample that splits producer (trace sender) and consumer (trace listener) into two different applications? I am able to successfully do this with TraceViewer. But not with EventTrace.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10386587" width="1" height="1"&gt;</description></item><item><title>re: Windows high speed logging: ETW in C#/.NET using System.Diagnostics.Tracing.EventSource </title><link>http://blogs.msdn.com/b/vancem/archive/2012/08/13/windows-high-speed-logging-etw-in-c-net-using-system-diagnostics-tracing-eventsource.aspx#10373104</link><pubDate>Thu, 29 Nov 2012 15:47:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10373104</guid><dc:creator>Vance Morrison</dc:creator><description>&lt;p&gt;Sorry for the delay. &amp;nbsp;EventSource was designed so that it could be a complete replacement for TraceSource. &amp;nbsp; Thus in an ideal world, a complete new code base would only use EventSource. &amp;nbsp; The reason is that it is safer/easier (at the logging sites you ONLY specify what is actually needed (only the logger, event &amp;nbsp;name and payload, no &amp;#39;events ids, or logging levels etc). &amp;nbsp; Moreover, EventSources (through EventListeners can do everything that TraceSources can do (in fact it is very straightforward to build a bridge where EventSource data gets written to TraceListeners (and thus any &amp;#39;back end&amp;#39; infrastructure based on TraceListeners will &amp;#39;just work&amp;#39;. &amp;nbsp; &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10373104" width="1" height="1"&gt;</description></item><item><title>re: Windows high speed logging: ETW in C#/.NET using System.Diagnostics.Tracing.EventSource </title><link>http://blogs.msdn.com/b/vancem/archive/2012/08/13/windows-high-speed-logging-etw-in-c-net-using-system-diagnostics-tracing-eventsource.aspx#10346258</link><pubDate>Tue, 04 Sep 2012 17:34:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10346258</guid><dc:creator>Randhir</dc:creator><description>&lt;p&gt;Thanks Vance for explaining this and making ETW palatable for general .Net public.&lt;/p&gt;
&lt;p&gt;Could you pls compare EventSource with TraceSource? I understand EventSource would be much more performant but do you see a place for TraceSource usage as well?&lt;/p&gt;
&lt;p&gt;Simply asking, if you are coding a version 1 of your product, would you only use EventSource or combination of EventSource and TraceSource?&lt;/p&gt;
&lt;p&gt;-Randhir&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10346258" width="1" height="1"&gt;</description></item><item><title>re: Windows high speed logging: ETW in C#/.NET using System.Diagnostics.Tracing.EventSource </title><link>http://blogs.msdn.com/b/vancem/archive/2012/08/13/windows-high-speed-logging-etw-in-c-net-using-system-diagnostics-tracing-eventsource.aspx#10339105</link><pubDate>Mon, 13 Aug 2012 16:28:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10339105</guid><dc:creator>Vance Morrison</dc:creator><description>&lt;p&gt;I am not making (or implying) anything about DTrace or how it compares to ETW. &amp;nbsp; For those who don&amp;#39;t know, DTrace is the analog to ETW on Unix operating systems. &amp;nbsp; &amp;nbsp;It is simply not an option on Windows platforms so such a comparison can only be useful to the implementors of each system since end users simply don&amp;#39;t have a choice. &amp;nbsp; &amp;nbsp;For what it is worth, I do think that ETW could benefit from some of the features of DTrace, but I also believe that both existing systems are more than good enough for the vast majority of diagnostic and performance investigations. &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;The weakest link frankly is user education about what capabilities are available, and I am trying to fix that at least for people working on windows operating systems (which are the only people who would probably care to read my blog). &amp;nbsp; &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10339105" width="1" height="1"&gt;</description></item><item><title>re: Windows high speed logging: ETW in C#/.NET using System.Diagnostics.Tracing.EventSource </title><link>http://blogs.msdn.com/b/vancem/archive/2012/08/13/windows-high-speed-logging-etw-in-c-net-using-system-diagnostics-tracing-eventsource.aspx#10339088</link><pubDate>Mon, 13 Aug 2012 15:45:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10339088</guid><dc:creator>Barry Kelly</dc:creator><description>&lt;p&gt;What you write seems to imply that you don&amp;#39;t think dtrace is a better solution?&lt;/p&gt;
&lt;p&gt;I think ETW is kind of over-engineered on one hand, yet limited and inflexible on the other. Dtrace seems way better to me.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10339088" width="1" height="1"&gt;</description></item></channel></rss>