DQL to pull all Endpoints\Requests for a particular Service

Hi,

I am trying to pull all the endpoints of a service but i am unable to fetch instead we can fetch only the endpoints which are marked key requests. Need help on this.

Please let me know if you are unclear on question.

Thanks in advance.

Hello @dkrishna,

If I understood correctly, you want something like this bellow:

fetch spans
| filter dt.smartscape.service == toSmartscapeId("SERVICE-xxxxxxx")
| filter transaction.is_root_span == true
| filter transaction.is_endpoint_request == true
| filter isNotNull(endpoint.name)
| summarize requests = count(), by: { endpoint.name }
| sort requests desc

I hope this helps you 😀

Hi MaximilianoML,

Good morning.

Hope you are doing good.

Thanks for your valuable inputs, its really worked but it is fetching only “Non Key Requests”. whereas I am looking for both Key Requests as well as Non Key Requests.

Many Thanks in Advance.

And also is there a way to differentiate Key Requests and Non Key Requests.

Hello, @dkrishna,

Unfortunately I don’t think it’s possible to filter them like we want here, so I post a Product Idea here

I think we can close this thread now, I hope it helped you 😊

Ok, Yes it was a great help. Thank you so much.

Hi @MaximilianoML

Sorry i last thing i missed to ask, can I have Failure rate, Response time and HTTP 5xx errors filters please.

You’re always free to comeback and ask more questions!

You might want something like this bellow:

fetch spans
| filter dt.smartscape.service == toSmartscapeId("SERVICE-xxxxxxxxx")
| filter request.is_root_span == true
| filter transaction.is_root_span == true
| filter transaction.is_endpoint_request == true
| filter isNotNull(endpoint.name)
| summarize
    requests = count(),
    failures = countIf(request.is_failed == true),
    avg_response_time = avg(duration),
    http_5xx = countIf(http.response.status_code >= 500 and http.response.status_code < 600),
  by: { endpoint.name }
| fieldsAdd failure_rate = if(requests > 0, 100.0 * failures / requests, else: 0.0)
| sort requests desc