Skip to content

Azure Function App Diagnostic Settings #8435

Answered by kevball2
rebuildtech asked this question in Q&A
Discussion options

You must be logged in to vote

You can using something like this

@description('Optional. Resource ID of log analytics workspace.')
param diagnosticWorkspaceId string = ''

param diagnosticLogCategoriesToEnable array = kind == 'functionapp' ? [
  'FunctionAppLogs'
] : [
  'AppServiceHTTPLogs'
  'AppServiceConsoleLogs'
  'AppServiceAppLogs'
  'AppServiceAuditLogs'
  'AppServiceIPSecAuditLogs'
  'AppServicePlatformLogs'
]

@description('Optional. The name of metrics that will be streamed.')
@allowed([
  'AllMetrics'
])
param diagnosticMetricsToEnable array = [
  'AllMetrics'
]


var diagnosticsLogs = [for category in diagnosticLogCategoriesToEnable: {
  category: category
  enabled: true
  retentionPolicy: {
    enabled: t…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@brwilkinson
Comment options

@pamelafox
Comment options

Answer selected by brwilkinson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants