12 releases (breaking)
| 0.10.1 | Dec 17, 2025 |
|---|---|
| 0.10.0 | Oct 1, 2025 |
| 0.9.1 | Jul 15, 2025 |
| 0.7.0 | Feb 11, 2025 |
| 0.1.0 | Mar 25, 2024 |
#1553 in Debugging
70KB
1.5K
SLoC
OpenTelemetry Log Exporter for ETW

| Status | |
|---|---|
| Stability | beta |
| Owners | Cijo Thomas, Lalit Kumar Bhasin |
This crate contains OpenTelemetry Log exporter to ETW (Event Tracing for Windows), a Windows solution for efficient tracing of kernel or application-defined events, similar to user_events on Linux. ETW events can be consumed in real-time or from a log file.
ETW events created with this crate can be generated and collected on Windows Vista or later.
This ETW exporter enables applications to use OpenTelemetry APIs to capture telemetry events and write to the ETW subsystem. From ETW, the events can be captured by agents running locally and listening for specific ETW events.
Viewing ETW Logs
Logs exported to ETW can be viewed using tools like logman, perfview etc.
Using logman
To view the telemetry emitted to ETW you can use logman along with perfview.
logman will listen to ETW events from the given provider (on this example, provider-name) and store them in a .etl file.
perfview will allow you to visualize the events.
Instructions using Powershell:
-
Get the ETW Session Guid for the given provider (on this example
provider-name):$EtwSessionGuid = (new-object System.Diagnostics.Tracing.EventSource("provider-name")).Guid.ToString() -
Start Logman session:
logman create trace OtelETWExampleBasic -o OtelETWExampleBasic.log -p "{$EtwSessionGuid}" -f bincirc -max 1000 logman start OtelETWExampleBasic -
Execute this example:
cd opentelemetry-etw-logs cargo run --example basic -
Stop and Remove
logmansession:logman stop OtelETWExampleBasic logman delete OtelETWExampleBasic -
View the events with
perfview:- Download PerfView: Instructions, Releases.
- Open PerfView.
- Go the location of the
.etlfile:OtelETWExampleBasic.log_000001.etland open it. - Double-click
Eventsin the left-panel. - Double-click the
provider-name/event-namein the left-panel. - You should see the events in the right-panel.
OpenTelemetry Overview
OpenTelemetry is an Observability framework and toolkit designed to create and manage telemetry data such as traces, metrics, and logs. OpenTelemetry is vendor- and tool-agnostic, meaning that it can be used with a broad variety of Observability backends, including open source tools like Jaeger and Prometheus, as well as commercial offerings.
OpenTelemetry is not an observability backend like Jaeger, Prometheus, or other commercial vendors. OpenTelemetry is focused on the generation, collection, management, and export of telemetry. A major goal of OpenTelemetry is that you can easily instrument your applications or systems, no matter their language, infrastructure, or runtime environment. Crucially, the storage and visualization of telemetry is intentionally left to other tools.
Dependencies
~3–6MB
~91K SLoC