Questions tagged [etw]

Event Tracing for Windows (ETW) is a high-speed tracing facility provided by the Windows Operating System which was first introduced in Windows 2000.

Event Tracing for Windows (ETW) is a general-purpose, high-speed tracing facility provided by the Windows operating system. Using a buffering and logging mechanism implemented in the kernel, ETW provides a tracing mechanism for events raised by both user-mode applications and kernel-mode device drivers.

Additionally, ETW gives you the ability to enable and disable logging dynamically, making it easy to perform detailed tracing in production environments without requiring reboots or application restarts. The logging mechanism uses per-processor buffers that are written to disk by an asynchronous writer thread. This allows large-scale server applications to write events with minimum disturbance.

ETW is the core tracing facility in Windows on top of which both the Event Log and WPP are built.

ETW was first introduced on Windows 2000. Since then, various core OS and server components have adopted ETW to instrument their activities, and it's now one of the key instrumentation technologies on Windows platforms.

On Windows Vista, ETW has gone through a major upgrade, and one of the most significant changes is the introduction of the unified event provider model and APIs. In short, the new unified APIs combine logging traces and writing to the Event Viewer into one consistent, easy-to-use mechanism for event providers. At the same time, several new features have been added to improve developer and end user experience.

445 questions
25
votes
7 answers

ETW, .NET 4.5 - how to write to the event log?

I am trying to wrap my head around ETW and how to integrate t into a high Performance application. We all know the old dreaded EventLog with it's non structured (and thus not so optimal) API. Now there is a new and fancy API for high performance…
TomTom
  • 61,059
  • 10
  • 88
  • 148
24
votes
2 answers

.NET Tracing: What is the "Default" listener?

Every example of tracing in .NET people remove the "Default" listener:
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
23
votes
2 answers

Performance counter vs ETW

Are performance counters part of ETW? If not, what is the difference between the two?
imak
  • 6,489
  • 7
  • 50
  • 73
23
votes
3 answers

Risk of missing events from ETW logging with EventSource

I'm instrumenting my .NET 4.5 applications to emit ETW events using the EventSource class. The goal is to be able to capture some of these events (the Error level events) for error logging. After doing some reading and testing, I am concerned about…
TCC
  • 2,546
  • 1
  • 24
  • 35
17
votes
2 answers

How to use ETW from a C++ Windows client

I'm researching Event Tracing for Windows (ETW) to allow a user-mode windows client to write out tracing information. The existing documentation is, to put it lightly, insanely incomplete. What would really help is a simple C++ example that writes…
Charles
  • 2,642
  • 3
  • 33
  • 53
16
votes
3 answers

What is the best way to log exceptions using ETW?

Is there a standard way to log exceptions using ETW? As far as I have seen the only way to do this is to log the message and possibly the inner exception message as there is not strongly typed parameter for the Exception type.
jaffa
  • 26,770
  • 50
  • 178
  • 289
15
votes
2 answers

Why use ETW over EventLog and vice versa?

Why should I use Event Tracing for Windows (ETW) over the standard .NET EventLog class, and vice versa? Does knowing that we'll be using quite a few performance counters impact the decision? What I know so far: ETW should perform much better. ETW…
Kaleb Pederson
  • 45,767
  • 19
  • 102
  • 147
15
votes
2 answers

How do you view ETW events created by EventSource using Windows Performance Analyzer?

I would like to fire ETW events using EventSource and view them with Windows Performance Analyzer. I have a basic EventSource: [EventSource(Name = "BasicEventSource")] public class ETWLogger : EventSource { #if DEBUG private const bool…
Tristan
  • 1,466
  • 1
  • 16
  • 24
14
votes
4 answers

WARNING -Provider resources not accessible running wevtutil

I need help solving the "Provider '' resources not accessible when trying to create a windows event provider. I create my manifest file with the ManGen utility, and name my '.exe' file as my message and resource file. I compile the '.rc' file with…
Robert G
  • 149
  • 1
  • 6
11
votes
4 answers

How to consume real-time ETW events from the Microsoft-Windows-NDIS-PacketCapture provider?

The larger question is how to consume real-time ETW network stack events in general but I'm particularly interested in the Microsoft-Windows-NDIS-PacketCapture provider. All other network stack providers partially work but the NDIS-PacketCapture…
11
votes
3 answers

What exactly are new ETW features in CLR 4.0?

My colleague mentioned that there are some major improvements in CLR 4.0 related to Event Tracing for Windows but I couldn't find details of what exactly is new. There are few blog posts that mention only about improvements but do not provide any…
imak
  • 6,489
  • 7
  • 50
  • 73
11
votes
1 answer

Getting WPF ETW events using XPerf.exe

I cannot figure out the correct combination of command line switches and parameters to feed to XPerf.exe to get it to load the WPF ETW provider (Microsoft-Windows-WPF? a42c77db-874f-422e-9b44-6d89fe2bd3e5? E13B77A8-14B6-11DE-8069-001B212B5009}?) and…
codekaizen
  • 26,990
  • 7
  • 84
  • 140
10
votes
3 answers

Windows - see active ETW sessions so that I can close one of them

I am working with Event Tracing for Windows API, and from time to time, I run my application and it does not manage to close the ETW trace controller session after opening it. Basically I do ::StartTrace([out] handle...) and do not close that…
Ghita
  • 4,465
  • 4
  • 42
  • 69
10
votes
1 answer

what does AWAIT_TIME exactly mean in the Azure profiler?

I am looking at my performance profile of one of my slowest requests, and I see an AWAIT_TIME of more than 6 seconds, but I am not able to get any more information regarding it. How do I figure out what exactly the process is "waiting on"?
Riz
  • 6,486
  • 19
  • 66
  • 106
9
votes
2 answers

Azure ServiceFabric samples not logging to ETW

I'm running the very first sample of ServiceFabric (Preview version 1.4.87): https://azure.microsoft.com/en-us/documentation/articles/service-fabric-create-your-first-application-in-visual-studio/ , to create a stateful service, and although the…
1
2 3
29 30