Azure 在customDimensions中从json扩展数据

Azure 在customDimensions中从json扩展数据,azure,azure-application-insights,Azure,Azure Application Insights,我使用以下代码将数据发送到application insights appInsights.trackEvent({ 名称:'EventName', 属性:{'keys1':'value1','key2':JSON.stringify({'nestedKey':'someValue'})} }); 在数据资源管理器中查询时 customEvents |扩展key2_1=parse_json(customDimensions.key2) |扩展键1\u 1=tostring(customDime

我使用以下代码将数据发送到application insights

appInsights.trackEvent({
名称:'EventName',
属性:{'keys1':'value1','key2':JSON.stringify({'nestedKey':'someValue'})}
});
在数据资源管理器中查询时

customEvents
|扩展key2_1=parse_json(customDimensions.key2)
|扩展键1\u 1=tostring(customDimensions.key1)
|扩展nestedKey1=tostring(key2\u 1.nestedKey)
|扩展nestedKey2=tostring(customDimensions.key2.nestedKey)

nestedKey1
nestedKey2
都是空的,但是
key1\u 1
key2\u 1
都有数据

只要替换两行即可:

| extend nestedKey1 = tostring(key2_1.nestedKey)
| extend nestedKey2 = tostring(customDimensions.key2.nestedKey)
使用以下两行代码:

| extend nestedKey1 = parse_json(tostring(key2_1)).nestedKey
| extend nestedKey2 = parse_json(tostring(parse_json(customDimensions.key2))).nestedKey
以下是我这边的测试结果: