opentelemetry-dotnet-instrumentation
opentelemetry-dotnet-instrumentation copied to clipboard
OpenTelemetry.DotNet.Auto.psm1 script digitally signed error
Bug Report
Seems that OpenTelemetry.DotNet.Auto.psm1 script is not signed
Symptom
I used Windows PowerShell (5.1 version as recommended) to execute the script and make auto instrumentation my Windows service. But PowerShell raised an exception on Import-Module command: "Import-Module : File ...\OpenTelemetry.DotNet.Auto.psm1 cannot be loaded. The file ..\OpenTelemetry.DotNet.Auto.psm1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170." So I was forced to change PowerShell execution policy to "unrestricted" value for execute that command but it's security violence (Of course I turned it back after execution).
Could you please sign OpenTelemetry.DotNet.Auto.psm1 script and add to documentation a warning about this issue for same future cases.
Thank you in advance!
Runtime environment:
- OpenTelemetry Automatic Instrumentation version: v1.0.0-rc.1 (the script was downloaded by path "https://raw.githubusercontent.com/open-telemetry/opentelemetry-dotnet-instrumentation/v1.0.0-rc.1/OpenTelemetry.DotNet.Auto.psm1")
- OS: Windows 10 Enterprise 22H2
- Windows PowerShell 5.1.19041.3031
- .NET version: .NET Framework 4.8, .NET Core 6, .NET Core 7
Steps to reproduce the behavior:
Just try to reproduce instructions from manual for PowerShell module (Windows): https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation#powershell-module-windows. The exception is raised on "Import-Module $download_path" command.
For now, OpenTelemetry does not have possibility to sign anything (nor scripts, nor libraries). Postponing to post-1.0.0
Got it, thank you.
I created https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/2821
Related to https://github.com/open-telemetry/community/issues/1672.