我正在尝试通过像这样登录我的 Azure 函数来使用结构化日志记录:
log.LogError("Failed to get object. ({customerId}, {objectId}, {errorMessage})", request.CustomerId,
request.ObjectId, errorMessage);
我的 Azure 函数通过诊断设置插入到 Log Analytics 工作区。
有没有办法从 Message 中提取 customerId、objectId 和 errorMessage ?
例如,我想创建一个仪表板,显示每个 customerId 的错误数。
我试图“提取字段”功能无济于事。我需要使用 Application Insights 和自定义维度吗?