# Query Service Method Tags Using DQL for Detailed Insights

**URL:** <https://community.dynatrace.com/t/query-service-method-tags-using-dql-for-detailed-insights/48700>\
**Category:** DQL\
**Tags:** dql, dynatrace-managed, tagging\
**Created:** [November 4, 2024, 6:28pm UTC](https://community.dynatrace.com/t/query-service-method-tags-using-dql-for-detailed-insights/48700 "2024-11-04T18:28:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RPbiaggio](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@RPbiaggio](https://community.dynatrace.com/u/RPbiaggio)\
**Post date:** [November 4, 2024, 6:28pm UTC](https://community.dynatrace.com/t/query-service-method-tags-using-dql-for-detailed-insights/48700/1 "2024-11-04T18:28:00Z")

</div>

Guys, I need to visualize the error rate of some requests, filtering by the tags that are registered in them. I’m not able to do the lookup correctly. The only way I found was using endpoint.name, but I have now identified that this is returning the wrong data, since there are different services with the same request name, so in this case I am receiving a request with a tag that is not correct.

I’m not able to get the method id to list in the lookup. Is this possible to do?

 ![RPbiaggio_0-1730744866727.png](https://global.discourse-cdn.com/dynatrace/original/3X/6/0/608aae81bbf241de7974d410f53aa736de74105d.png)

```markup
timeseries 
  Total = sum(dt.service.request.count),
    by:{endpoint.name,dt.entity.service,http.response.status_code}
| lookup [fetch dt.entity.service_method], 
  sourceField:endpoint.name, 
  lookupField:entity.name, 
  fields:{tags,id}
| expand tags

```

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [September 30, 2025, 7:57pm UTC](https://community.dynatrace.com/t/query-service-method-tags-using-dql-for-detailed-insights/48700/2 "2025-09-30T19:57:45Z")

</div>

Give this a try:

```markup
timeseries 
  Total = sum(dt.service.request.count),
    by:{endpoint.name,dt.entity.service,http.response.status_code}
| lookup [fetch dt.entity.service], 
  sourceField:dt.entity.service, 
  lookupField:entity.name, 
  fields:{tags,id}
| fieldsAdd dt.entity.service.name = entityName(dt.entity.service)
| expand tags

```
