Skip to content

ETW exporter #326

@maxgolov

Description

@maxgolov

This project is created in response to Community Bridge Q3-Q4. We are looking for interns to work on this project.

open-telemetry/community#468

Project

Add exporter for ETW (Event Tracing for Windows) as one of the optional recommended exporters that languages may decide to implement as part of SDK.

Logical Reasoning

Application logs, service logs, even Docker-on-Windows logs can be directed to ETW (ref. https://docs.docker.com/config/containers/logging/etwlogs/ ). Many products running on Windows (most Microsoft products, Intel products, Docker, etc.) - rely on ETW channel.

Adding support for ETW for Windows platforms in SDK would allow any cross-platform codebase to be instrumented with OpenTelemetry instead of using Win32 API directly, e.g. replacing Docker etwlogs driver with structured ETW traces emitted using OpenTelemetry C++ SDK. Final product demo could be the Docker using OpenTelemetry C++ SDK for traces, and Docker on Windows - using OpenTelemetry C++ SDK with ETW exporter.

Extra bonus points

Two 'extra' pieces that may be covered in addition to the main exporter piece:

  • writing a projection layer for other languages (e.g. Java or node on Windows), that allows to dispatch traces from OT Java to OT C++ SDK with ETW exporter. That flow would allow Java and node services / servers running on Windows hosts to route their telemetry to ETW listener agent.

  • separate effort that implements ETW Provider listener (Agent), that subsequently uses OpenTelemetry .NET SDK to dispatch all telemetry collected to OTLP exporter (or any other exporter supported by .NET SDK). Very nice and simple example how to implement such a listener: https://github.com/fireeye/SilkETW

Two alternate implementations of the ETW message packing

  • First approach is to utilize MsgPack-encoded event payload. This approach allows to send structured objects / nested objects over ETW to the Agent. This approach has no external dependencies, but is incompatible with some existing ETW tracing tools. Work on this track can be started right away.

  • Second approach is to use standard ETW "dynamic manifest" events. This approach allows to express an event as key-value property bag, flat list. I am working with MSFT CELA to contribute Microsoft TraceLoggingDynamic C++ implementation in OSS. Main benefit of this approach is it will be compatible with already existing ETW tracing tools (such as Windows Performance Analyzer, xperf, etc.). ETA for OSS is by the end of this year.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedGood for taking. Extra help will be provided by maintainers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions