# Nice to know about entity selectors (and tagging)

**URL:** <https://community.dynatrace.com/t/nice-to-know-about-entity-selectors-and-tagging/35595>\
**Category:** Dynatrace Tips\
**Tags:** entity-selector\
**Created:** [June 24, 2022, 9:01am UTC](https://community.dynatrace.com/t/nice-to-know-about-entity-selectors-and-tagging/35595 "2022-06-24T09:01:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [June 24, 2022, 9:01am UTC](https://community.dynatrace.com/t/nice-to-know-about-entity-selectors-and-tagging/35595/1 "2022-06-24T09:01:56Z")

</div>

Hello,

_You can use the entity selector on the&nbsp;&nbsp;Relation target entity!_

As an example, suppose you have multiple namespaces in Azure and you have the same name for a service bus queue in these namespaces.

You need to tag these queue’s using below entity selector.

type(azure\_service\_bus\_queue),

toRelationships.isAzrServiceBusNamespaceOfQueue(type(AZURE\_SERVICE\_BUS\_NAMESPACE),

entityName(“namespace”))

It looks like a complex query but if you read,

select this type, with this relation (but select only these target entities)

[@henridb](https://community.dynatrace.com/user/4758)&nbsp;: thanks for sharing!

KR Henk

---

<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:** [June 24, 2022, 1:18pm UTC](https://community.dynatrace.com/t/nice-to-know-about-entity-selectors-and-tagging/35595/2 "2022-06-24T13:18:29Z")

</div>

Thanks for sharing!

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [June 24, 2022, 8:56pm UTC](https://community.dynatrace.com/t/nice-to-know-about-entity-selectors-and-tagging/35595/3 "2022-06-24T20:56:57Z")

</div>

fromRelationships and toRelationships are great, that’s for sure.

For those that want to know where to get all possibilities, just check with&nbsp;[Monitored entities API - GET entity type — Dynatrace Docs](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/get-entity-type)

---

<div class="post-metadata">

**Author:** ![techean](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/techean/32/227_2.png) [@techean](https://community.dynatrace.com/u/techean)\
**Post date:** [June 27, 2022, 6:43am UTC](https://community.dynatrace.com/t/nice-to-know-about-entity-selectors-and-tagging/35595/4 "2022-06-27T06:43:03Z")

</div>

:thankyou:for sharing this 😉

---

<div class="post-metadata">

**Author:** ![Sujit](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/sujit/32/15043_2.png) [@Sujit](https://community.dynatrace.com/u/Sujit)\
**Post date:** [July 29, 2022, 12:56am UTC](https://community.dynatrace.com/t/nice-to-know-about-entity-selectors-and-tagging/35595/5 "2022-07-29T00:56:32Z")

</div>

[@henk\_stobbe](https://community.dynatrace.com/user/11427)&nbsp;Thanks for sharing this… looks intresting..

Thanks,

Sujit
