简体   繁体   中英

Is it possible to create ETW Events and listen to them on the same cloud service with multiple roles?

I have a worker role in which I generate ETW events through my EventSource . I want to have a separate worker role to persist those generated events using TraceEvent library and write them to Azure tables.

However, Azure cloud service creates instances of your roles and runs them on probably different VMs for which we don't have much control. I assume these two roles probably end up in different machines, so the second worker role would get nothing. Am I right?

The remaining option would be not to have that second worker role, but have that listener initialized as a Startup Task then. Correct?

The definition of a role is simply a virtual machine. Therefore, it is not possible to create a second role to listen events pushed to ETW from another role. The only option is to use startup task definition to kick off a background process (console application, windows service or some other application). Here is a blog post describing how to create windows services and deploy along with cloud services.

More detailed answers on role definitions are here and here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM