问题描述
我有一个与App Insights实例绑定的Azure函数(Python)。该功能从Azure存储下载较大的Blob以进行处理。 BlobClient
会对blob容器进行大量调用,这是加载到内存中的一部分。
约2GB的文件会导致App Insights日志被截断(日志中的最后一条消息应为### File Successfully Processed ###
)
Kusto查询为:
union traces
| union exceptions
| where timestamp > ago(30d)
| where operation_Id == 'bigGUID'
| where customDimensions['InvocationId'] == 'bigGUID2'
| order by timestamp asc
| project timestamp,message = iff(message != '',message,iff(innermostMessage != '',innermostMessage,customDimensions.['prop__{OriginalFormat}'])),logLevel = customDimensions.['LogLevel']
单个事件的App Insights日志长度是否有限制?
解决方法
是的,有最大长度。 请在这里找到答案:
Azure Application Insight. Custom attribute length restriction
消息的最大允许限制为32768。对于属性集合中的项目,值的最大限制为8192。
参考:https://github.com/microsoft/ApplicationInsights-Home/blob/master/EndpointSpecs/Schemas/Bond/MessageData.bond