Skip to content

Add ETW mapping to logs data model appendix#5159

Open
swashtek wants to merge 11 commits into
open-telemetry:mainfrom
swashtek:etw-receiver-data-model-mapping
Open

Add ETW mapping to logs data model appendix#5159
swashtek wants to merge 11 commits into
open-telemetry:mainfrom
swashtek:etw-receiver-data-model-mapping

Conversation

@swashtek

@swashtek swashtek commented Jun 16, 2026

Copy link
Copy Markdown

Fixes #
Add ETW mapping to logs data model appendix

Changes

Please provide a brief description of the changes here.

For non-trivial changes, follow the change proposal process.

@swashtek swashtek requested a review from a team as a code owner June 16, 2026 21:04
@swashtek swashtek force-pushed the etw-receiver-data-model-mapping branch from 1ec51f5 to 25a0388 Compare June 16, 2026 21:12
Comment thread CHANGELOG.md Outdated
Co-authored-by: Reiley Yang <reyang@microsoft.com>
@swashtek swashtek changed the title Add ETW receiver mapping to logs data model appendix Add ETW mapping to logs data model appendix Jun 17, 2026
Comment thread specification/logs/data-model-appendix.md Outdated
Comment thread specification/logs/data-model-appendix.md
Co-authored-by: Reiley Yang <reyang@microsoft.com>
Comment thread specification/logs/data-model-appendix.md Outdated
@pellared pellared self-requested a review June 17, 2026 18:31
@pellared pellared dismissed their stale review June 17, 2026 18:31

comment addressed

| Version | uint8 | Version from the event descriptor | `Attributes["etw.version"]` |
| Keywords | uint64 | Keywords bitmask from the event descriptor | `Attributes["etw.keywords"]` |
| ProcessId | uint32 | Emitting process ID from the event header | `Attributes["etw.process_id"]` |
| ThreadId | uint32 | Emitting thread ID from the event header | `Attributes["etw.thread_id"]` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still claims the ETW level is preserved in Attributes["etw.level"], but the ETW receiver linked in the thread does not currently emit that attribute. In the level 0 and provider-defined/reserved cases, the receiver maps severity to unspecified or leaves severity unset, so downstream consumers cannot recover the original ETW level from the OTel record.

I think the fix should either drop the reversibility claim from this example or update the referenced implementation and tests to actually append etw.level. Otherwise the appendix documents behavior that the implementation does not provide.

@swashtek swashtek Jun 17, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, I am adding the preserving change simultaneously, I intend to complete the below PR in receiver before merging spec document. I will keep this comment unresolved until then. Thanks.
open-telemetry/otel-arrow#3309

@swashtek swashtek force-pushed the etw-receiver-data-model-mapping branch from 9e5f90c to f74da0d Compare June 17, 2026 21:52
Comment thread specification/logs/data-model-appendix.md Outdated
Comment thread specification/logs/data-model-appendix.md Outdated
Comment thread specification/logs/data-model-appendix.md Outdated
Comment on lines +823 to +824
| ProcessId | uint32 | Emitting process ID from the event header | `Attributes["etw.process_id"]` |
| ThreadId | uint32 | Emitting thread ID from the event header | `Attributes["etw.thread_id"]` |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason this is not using Otel semconv for threads and processes for attributes (thread.id and process.pid)?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could definitely use process.pid.

However, we can't use thread.id here because the semconv definition for it says:

Current “managed” thread ID (as opposed to OS thread ID)

ETW is an OS/kernel facility. The thread ID it emits is the OS thread ID.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the event came from the kernel executive from IRQ? I guess there won't be process/thread?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EVENT_HEADER always carries ThreadId and ProcessId (fixed ULONG fields). For some contexts (e.g. kernel/interrupt) the value may not correspond to a meaningful thread/process, but it's always present. So, our stance is to always emit whatever the header provides and let consumers interpret it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants