Skip to main content

Integrations

Monitor Event Ingestion with QueueTrigger Logs

Use the following to monitor event ingestion with QueueTrigger logs:

{"Trigger":"Queue", "Type":"event_stats", "total_events": total_events,
 "sqs_ids_seen_so_far": sqs_ids_seen_so_far, "aggregated_file_size": 
  accumulated_file_size}
{"Trigger":"Queue", "stream_name":stream_name, "Type":"file_stats", "link": link,
 "bucket": bucket, "sqs_message_id": messageId, "file_size_bytes": file_size}      

Use traces or AppTraces to monitor for the preceding messages.

Use this example query that lists all the SQS ids seen so far:

AppTraces
| where  OperationName has 'QueueTriggerFuncApp' and Message has 'event_stats'   
| extend event_stats = parse_json(Message)
| project total_events = toint(event_stats.total_events), aggregated_file_size_in_bytes
 = toint(event_stats.aggregated_file_size), file_count = 
  toint(event_stats.sqs_ids_seen_so_far)
| summarize total_events = sum(total_events), total_bytes_ingested_in_bytes =
 sum(aggregated_file_size_in_bytes), total_sqs_processed = sum(file_count)
| extend TotalMegabytesIngested = total_bytes_ingested_in_bytes / 1024.0 / 1024.0
| project total_events, TotalMegabytesIngested, total_sqs_processed
AppTraces
| where OperationName has 'QueueTriggerFuncApp' and Message has 'event_stats'
| extend event_stats = parse_json(Message)
| project  
  total_events = toint(event_stats.total_events),  
  aggregated_file_size_in_bytes = toint(event_stats.aggregated_file_size),  
  sqs_count = toint(event_stats.sqs_ids_seen_so_far),  
  _ResourceId
| summarize   
  total_events = sum(total_events),
  total_bytes_ingested_in_bytes = sum(aggregated_file_size_in_bytes)/ 1024.0 / 1024.0,
  total_files_processed = sum(sqs_count)
by _ResourceId