opentelemetry-etw-logs

Crates.ioopentelemetry-etw-logs
lib.rsopentelemetry-etw-logs
version0.9.1
created_at2024-03-25 21:45:27.63142+00
updated_at2025-07-15 19:50:53.426323+00
descriptionOpenTelemetry logs exporter to ETW (Event Tracing for Windows)
homepagehttps://github.com/open-telemetry/opentelemetry-rust-contrib/tree/main/opentelemetry-etw-logs
repositoryhttps://github.com/open-telemetry/opentelemetry-rust-contrib/tree/main/opentelemetry-etw-logs
max_upload_size
id1185722
size109,038
rust-publishers (github:open-telemetry:rust-publishers)

documentation

README

OpenTelemetry Log Exporter for ETW

OpenTelemetry — An observability framework for cloud-native software.

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.

Crates.io: opentelemetry-etw-logs Documentation LICENSE GitHub Actions CI Slack

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:

  1. 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()
    
  2. Start Logman session:

    logman create trace OtelETWExampleBasic -o OtelETWExampleBasic.log -p "{$EtwSessionGuid}" -f bincirc -max 1000
    logman start OtelETWExampleBasic
    
  3. Execute this example:

    cd opentelemetry-etw-logs
    cargo run --example basic
    
  4. Stop and Remove logman session:

    logman stop OtelETWExampleBasic
    logman delete OtelETWExampleBasic
    
  5. View the events with perfview:

    • Download PerfView: Instructions, Releases.
    • Open PerfView.
    • Go the location of the .etl file: OtelETWExampleBasic.log_000001.etl and open it.
    • Double-click Events in the left-panel.
    • Double-click the provider-name/event-name in 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.

Commit count: 1014

cargo fmt