Azure自动化日志记录到Application Insight
是他们从Azure Automation向application insight发送自定义跟踪数据的任何方式 例: 注意:这是来自Azure automation,而不是来自独立脚本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]
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
}
}