# jonny-jhnson/etwinspector architecture

> Architecture diagram of the GitHub repository jonny-jhnson/etwinspector, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jonny-jhnson/etwinspector
- Repository: https://github.com/jonny-jhnson/etwinspector

## Overview

EtwInspector is a PowerShell-accessible Windows ETW toolkit. Users invoke cmdlets to discover providers and sessions, capture traces, or export and compare provider snapshots. Snapshot export combines registered-provider enumeration with optional TraceLogging binary scanning; session inspection and capture are separate workflows. The excerpts show snapshot orchestration and data-collector parsing, but not the PowerShell module’s command wiring or all enumeration internals, so those links rely on README statements or are omitted.

Main entry points: [`EtwInspector/EtwInspectorModule/EtwInspector.psm1`](https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/EtwInspectorModule/EtwInspector.psm1) (EtwInspector module), [`EtwInspector/src/Snapshot.cs`](https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/Snapshot.cs) (Snapshot export), [`EtwInspector/src/GetProviders.cs`](https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/GetProviders.cs) (Provider enumeration), [`EtwInspector/src/TraceLoggingEnumeration.cs`](https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/TraceLoggingEnumeration.cs) (TraceLogging scan)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["PowerShell interface"]
  node_module["EtwInspector module<br/>[EtwInspector.psm1]"]
end

subgraph group_discovery["ETW discovery"]
  node_providers["Provider enumeration<br/>[GetProviders.cs]"]
  node_tlgscan["TraceLogging scan"]
  node_sessions["Session inspection<br/>[TraceSessions.cs]"]
  node_security["Provider security<br/>[GetProviders.cs]"]
end

subgraph group_operations["Capture and snapshots"]
  node_capture["Trace capture<br/>[CaptureEvents.cs]"]
  node_snapshotexport["Snapshot export<br/>[Snapshot.cs]"]
  node_snapshotio["Snapshot serialization<br/>[Snapshot.cs]"]
  node_snapshotdiff["Snapshot comparison<br/>[Snapshot.cs]"]
end

node_user(("PowerShell user"))

node_user -->|"invokes commands"| node_module
node_module -->|"exposes command"| node_providers
node_module -->|"exposes command"| node_sessions
node_module -->|"exposes commands"| node_capture
node_module -->|"exposes command"| node_snapshotexport
node_module -->|"exposes command"| node_snapshotdiff
node_module -->|"exposes command"| node_security
node_snapshotexport -->|"enumerates providers"| node_providers
node_snapshotexport -->|"scans binaries"| node_tlgscan
node_snapshotexport -.->|"writes snapshot"| node_snapshotio
node_snapshotdiff -->|"reads snapshots"| node_snapshotio

click node_module "https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/EtwInspectorModule/EtwInspector.psm1"
click node_providers "https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/GetProviders.cs"
click node_tlgscan "https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/TraceLoggingEnumeration.cs"
click node_sessions "https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/TraceSessions.cs"
click node_security "https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/GetProviders.cs"
click node_capture "https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/CaptureEvents.cs"
click node_snapshotexport "https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/Snapshot.cs"
click node_snapshotio "https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/Snapshot.cs"
click node_snapshotdiff "https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/Snapshot.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_module,node_user toneBlue
class node_providers,node_tlgscan,node_sessions,node_security toneAmber
class node_capture,node_snapshotexport,node_snapshotio,node_snapshotdiff toneMint
```

## Components

### PowerShell interface

- [EtwInspector module](https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/EtwInspectorModule/EtwInspector.psm1): `EtwInspector/EtwInspectorModule/EtwInspector.psm1`

### ETW discovery

- [Provider enumeration](https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/GetProviders.cs): `EtwInspector/src/GetProviders.cs`
- [TraceLogging scan](https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/TraceLoggingEnumeration.cs): `EtwInspector/src/TraceLoggingEnumeration.cs`
- [Session inspection](https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/TraceSessions.cs): `EtwInspector/src/TraceSessions.cs`
- [Provider security](https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/GetProviders.cs): `EtwInspector/src/GetProviders.cs`

### Capture and snapshots

- [Trace capture](https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/CaptureEvents.cs): `EtwInspector/src/CaptureEvents.cs`
- [Snapshot export](https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/Snapshot.cs): `EtwInspector/src/Snapshot.cs`
- [Snapshot serialization](https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/Snapshot.cs): `EtwInspector/src/Snapshot.cs`
- [Snapshot comparison](https://github.com/jonny-jhnson/etwinspector/blob/main/EtwInspector/src/Snapshot.cs): `EtwInspector/src/Snapshot.cs`

### Other components

- **PowerShell user**

## Connections

- PowerShell user → EtwInspector module: invokes commands (evidence: `README.md`)
- EtwInspector module → Provider enumeration: exposes command (evidence: `README.md`)
- EtwInspector module → Session inspection: exposes command (evidence: `README.md`)
- EtwInspector module → Trace capture: exposes commands (evidence: `README.md`)
- EtwInspector module → Snapshot export: exposes command (evidence: `README.md`)
- EtwInspector module → Snapshot comparison: exposes command (evidence: `README.md`)
- EtwInspector module → Provider security: exposes command (evidence: `README.md`)
- Snapshot export → Provider enumeration: enumerates providers (evidence: `EtwInspector/src/Snapshot.cs`)
- Snapshot export → TraceLogging scan: scans binaries (evidence: `EtwInspector/src/Snapshot.cs`)
- Snapshot export → Snapshot serialization: writes snapshot (evidence: `EtwInspector/src/Snapshot.cs`)
- Snapshot comparison → Snapshot serialization: reads snapshots (evidence: `EtwInspector/src/Snapshot.cs`)
