我喜欢用卷曲从我的应用程序的见解获取数据,但我无法从customDimensions数据(其中包含JSON数据)。一个简单的查询是这样:
curl "https://api.applicationinsights.io/v1/apps/my-app-id/query?query=traces%20%7C%20project%20customDimensions" -H "x-api-key: my-api-key"
让我们假设的痕迹表包含10个条目,则反应是这样的:
{
"tables": [
{
"name": "PrimaryResult",
"columns": [
{
"name": "customDimensions",
"type": "dynamic"
}
],
"rows": [
[ null ],
[ null ],
[ null ],
[ null ],
[ null ],
[ null ],
[ null ],
[ null ],
[ null ],
[ null ]
]
}
]
}
使用在蔚蓝的门户应用的见解查询编辑器,同样的查询工作正常,并返回customDimensions。
提前致谢。
你可以试试这个门户网站从cURL-查询应用程序细节
https://dev.applicationinsights.io/apiexplorer/query。
在请求选项卡中选择卷曲并在查询选项卡上只写痕迹|项目customDimensions。它的工作对me.In这样你可以肯定的是,从卷曲查询会工作。