FunctionAppLogs 테이블에 대한 쿼리

Function Apps에서 애플리케이션 로그 표시

시간별로 정렬된 애플리케이션 로그 목록입니다(먼저 표시된 최신 로그).

FunctionAppLogs 
| project TimeGenerated, HostInstanceId, Message, _ResourceId
| sort by TimeGenerated desc

경고 또는 예외가 있는 로그 표시

경고 또는 예외가 포함된 로그 목록입니다(먼저 표시된 최신 로그).

FunctionAppLogs
| where Level == "Warning" or Level == "Error"
| project TimeGenerated, HostInstanceId, Level, Message, _ResourceId
| sort by TimeGenerated desc

오류 및 예외 수

애플리케이션당 지난 1시간 동안의 경고 또는 오류가 포함된 로그 수의 세로 막대형 차트를 표시합니다.

FunctionAppLogs 
| where TimeGenerated > ago(1h)
| where Level == "Warning" or Level == "Error"
| summarize count_per_app = count() by _ResourceId
| sort by count_per_app desc 
| render columnchart

시간 경과에 따른 함수 작업

시간에 따른 함수당 함수 요청 볼륨의 추세를 보여 주는 꺾은선형 차트입니다.

FunctionAppLogs
//| where _ResourceId == "MyResourceId" // Uncomment and enter a resource ID to get results for a specific resource
| where Category startswith "Function." and Message startswith "Executed "
| summarize count() by bin(TimeGenerated, 1h), FunctionName // Aggregate by hour
| render timechart

함수 결과

개별 함수 호출은 지난 1시간 동안 발생합니다(먼저 표시된 최신 로그).

FunctionAppLogs
| where TimeGenerated > ago(1h)
| where Category startswith "Function." and Message startswith "Executed "
| parse Message with "Executed '" Name "' ("  Result ", Id=" Id ", Duration=" Duration:long "ms)"
| project TimeGenerated, FunctionName, Result, FunctionInvocationId, Duration, _ResourceId
| sort by TimeGenerated desc

함수 오류율

시간당 함수 성공 및 오류를 요약합니다.

FunctionAppLogs
| where Category startswith "Function." and Message startswith "Executed "
| parse Message with "Executed '" Name "' ("  Result ", Id=" Id ", Duration=" Duration:long "ms)"
// | where Name == "MyFunction" // Use this to restrict to a specific function
| summarize count() by bin(TimeGenerated, 1h), Name, Result, _ResourceId
| order by TimeGenerated desc