Repository navigation
PowerShell ETW logging on windows needs to use a unique provider id and register the manifest. #4939
Description
Activity
It might be worth moving to EventSource instead of using ETW directly - this would be useful on Linux/Mac.
Reacted by IlyaWhat is the plan for several different PS versions installed side-by-side?
I think side-by-side PSCore should be fine in the same log as long as it can be filtered. PSCore and Windows PowerShell should be completely separate
Would it be possible to set up a PowerShell v6 source for each version so that side by side of multiple v6 versions could be differentiated
I believe the current thinking is to have PSCore6.x all in the same log, but should be easy to filter for a particular version.
RichardSiddaway As Steve Lee (@SteveL-MSFT) said we can use a field to filter. The field can be PSVersion or GitCommitId.
- addedWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
on Sep 29, 2017 For reference: #1189. I looked into it a while ago and noted additional actions that must take place for PowerShell Core to support it.
- added a commit that references this issue
on Nov 6, 2017 Dan Travison (@dantraMSFT) #5360 has been merged. Do you want to leave this issue open to track the manifest file clean up work?
dantraMSFT commented
on Nov 9, 2017 ContributorAuthorMore actionsNo, I'll close it and create a separate issue. I don't know when we'll do the manifest cleanup since it depends on removing full CLRcode that references it.
dantraMSFT commented
on Nov 9, 2017 ContributorAuthorMore actionsActually, this needs to remain open until the PowerShell.Core.Instrumentation nuget package is published.
Currently, PowerShell uses the same ETW provider GUID as PowerShell on Windows. This presents a few, subtle problems:
1: PowerShell 6 events cannot be easily distinguished from PowerShell/Windows.
2: PowerShell 6 is relying on a valid ETW manifest being registered to ensure events can be decoded. This assumption breaks on down-level systems that do not contain PowerShell/Windows 5.X and also ties PowerShell 6 to PowerShell/Windows events.
The solution is as follows:
1: Snapshot the PowerShell/Windows ETW manifest and update the provider GUID and Provider Name.