我正在尝试根据我拥有的不同端点聚合 API 日志。一共有4个端点:
1:/v1/vehicle_locations
2:/v1/vehicle_locations/id
3:/v1/driver_locations
4:/v1/driver_locations/id
我目前这样做的方式是:
_sourceCategory=production | keyvalue auto | where (path matches "/v1/driver_locations" OR path matches "/v1/driver_locations/*" or path matches "/v1/vehicle_locations" or path matches "/v1/vehicle_locations/*") | count by path
问题在于,虽然我得到了 and 的正确聚合,但我得到了/v1/vehicle_locations
and的/v1/driver_locations
单独结果/v1/driver_locations/id
,/v1/vehicle_locations/id
因为 id 是通配符。有没有办法我也可以聚合这些通配符?