Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure自动化日志记录到Application Insight_Azure_Automation - Fatal编程技术网

Azure自动化日志记录到Application Insight

Azure自动化日志记录到Application Insight,azure,automation,Azure,Automation,是他们从Azure Automation向application insight发送自定义跟踪数据的任何方式 例: 注意:这是来自Azure automation,而不是来自独立脚本 workflow sample { InlineScript { $assemblyPath = "C:\Modules\Global\Azure\Compute\Microsoft.ApplicationInsights.dll" [System.Reflection.Assembly]

是他们从Azure Automation向application insight发送自定义跟踪数据的任何方式

例:

注意:这是来自Azure automation,而不是来自独立脚本

workflow sample {
   InlineScript {
     $assemblyPath = "C:\Modules\Global\Azure\Compute\Microsoft.ApplicationInsights.dll"
     [System.Reflection.Assembly]::LoadFrom($assemblyPath)
     $TelClient = New-Object "Microsoft.ApplicationInsights.TelemetryClient"
     $TelClient.InstrumentationKey = "1234"
     $TelClient.TrackEvent("New message")
     $TelClient.Flush
   }
}
一个相关的未回答的问题
workflow sample {
   InlineScript {
     $assemblyPath = "C:\Modules\Global\Azure\Compute\Microsoft.ApplicationInsights.dll"
     [System.Reflection.Assembly]::LoadFrom($assemblyPath)
     $TelClient = New-Object "Microsoft.ApplicationInsights.TelemetryClient"
     $TelClient.InstrumentationKey = "1234"
     $TelClient.TrackEvent("New message")
     $TelClient.Flush
   }
}