14 Oct 2025
11:58 AM
- last edited on
15 Oct 2025
01:57 PM
by
MaciejNeumann
Hi community can anyone solve my problem?
Scenario: I want to auto tag all the workloads belonging to ms-prod, and ms-app namespaces which are under ms-prodcution cluster. Tell me how can i do this. Using entity selector expression. So far i was using this expression but its not working
type(CLOUD_APPLICATION).toRelationships.isNamespaceOfCa(type(CLOUD_APPLICATION_NAMESPACE),entityName.in("ms-prod","ms-app").toRelationships.isClusterOfNamespace(type(KUBERNETES_CLUSTER),entityName("ms-prodcution"))
also, If you guys can send me the documentation where i can find these relationship detail then that would be helpful
Solved! Go to Solution.
14 Oct 2025 12:26 PM
Hello @skhamitkar
Try the following.
type(CLOUD_APPLICATION),toRelationships.isNamespaceOfCa(type(CLOUD_APPLICATION_NAMESPACE),entityName.in("ms-prod","ms-app"),toRelationships.isClusterOfNamespace(type(KUBERNETES_CLUSTER),entityName("ms-prodcution")))Regards,
Babar Qayyum
14 Oct 2025 01:15 PM
@Babar_Qayyum
You saved my day, thanks for your response😊
15 Oct 2025 09:29 AM
@Babar_Qayyum Can you send me the documentation link to learn more about dynatrace entity relations??
Any resource that can be helpfull mostly for beginners like me.
15 Oct 2025 10:02 AM
Hello @skhamitkar
This is a starting point.
https://docs.dynatrace.com/docs/shortlink/api-entities-v2-selector
Regards,
Babar Qayyum
14 Oct 2025 12:51 PM
on aside note with Kubernetes tagging, I really wish we could use placeholders with the entity selector tag method.