08 Oct 2025 02:19 AM - edited 08 Oct 2025 02:22 AM
i want to exclude 403 from this metric selector of query queryDefinition for API yaml
builtin:service.keyRequest.errors.fourxx.count:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method),entityName.equals(~"<my-api-url>~")"))))):splitBy():sort(value(auto,descending)):limit(20)
i have tried this
builtin:service.keyRequest.errors.fourxx.count:filter(and(ne("http.status",403),or(in("dt.entity.service_method",entitySelector("type(service_method),entityName.equals(~"<my-api-url>~")"))))):splitBy():sort(value(auto,descending)):limit(20)
but i am getting error that http.status is not a valid dimension. we are using dyntrace classic
is it possible through queryDefinition or any other setting configuration is required ?
Solved! Go to Solution.
08 Oct 2025 07:12 AM
It simple - you cannot. This classic metric sums all 4xx codes already.
If you need any other behaviour, there are multiple ways. Probably I'd go with defining a calculated service metric for this purpose.
If you are on SaaS, the Grail metric has the dimension:
timeseries sum(dt.service.request.failure_count), by: { http.response.status_code }