关注this guide,我看到了如何过滤自定义维度,但如何在有“。”时进行过滤。在键/属性名称?
例如,我想从此自定义维值中过滤ServiceFabric.ServiceTypeName
:
{
"AspNetCoreEnvironment": "Production",
"ServiceFabric.ApplicationTypeName": "MyCompany.MyAppType",
"ServiceFabric.ServiceTypeName": "MyService",
"ServiceFabric.ApplicationName": "fabric:/MyCompany.MyApp",
"ServiceFabric.PartitionId": "some-guid",
"ServiceFabric.ServiceName": "fabric:/MyCompany.MyApp/MyService",
"ServiceFabric.InstanceId": "55555",
"ServiceFabric.NodeName": "my-node",
"CategoryName": "Microsoft.AspNetCore.Hosting.Internal.WebHost",
"Protocol": "HTTP/1.1",
"Host": "MyCompany.com",
"Method": "GET",
"Scheme": "https",
"Path": "/api/values"
}
以下不起作用......
traces
| extend type = customDimensions.ServiceFabric.ApplicationTypeName
| where type == "MyCompany.MyAppType"
| order by timestamp desc
答案 0 :(得分:1)
具有特殊事物的名称的语法是:
customDimensions["ServiceFabric.ApplicationTypeName"]
您可以使用该括号+引号来命名列:
| extend ["This is a column with spaces"] = blah
或
| project-rename ["Name with space"] = name
来自:https://docs.loganalytics.io/docs/Learn/References/Naming-principles
- 必须使用
引用包含特殊字符的实体名称['
和']
或使用["
和"]
- 必须使用
引用作为语言关键字的实体名称。['
和']
或使用["
和"]