05 Feb 2026
04:17 PM
- last edited on
16 Feb 2026
07:48 AM
by
MaciejNeumann
We are looking to create Auto Tag Rules based on entity relationships. (As mentioned here https://www.youtube.com/watch?v=Hh2tWerFnjk
I want to validate our process.
--Create the following tagging rules:(entity selector)
Entities matching type(SERVICE),toRelationships.calls(type(APPLICATION),tag("application:XYZ"))
Entities matching type(SERVICE), toRelationships.calls(type(SERVICE),tag("application:XYZ"))
Entities matching type(HOST),toRelationships.runsOnHost(type(SERVICE),tag("application:XYZ"))
Entities matching type(PROCESS_GROUP),toRelationships.runsOn(type(SERVICE),tag("application:XYZ"))
Questions I have:
1)Does the order that these are created matter? OR will dynatrace pick up these tagging rules once the pre-requisite tag has been applied?
2)Are we able to leverage placeholders? ie) {WebApplication:Name}
This would prevent us from having to create a set of these rules for over 100 applications
Solved! Go to Solution.
05 Feb 2026 08:24 PM
Questions I have:
1)Does the order that these are created matter? OR will dynatrace pick up these tagging rules once the pre-requisite tag has been applied?
Hello @NateShenner the order itself is not important all rules are going to be executed.
2)Are we able to leverage placeholders? ie) {WebApplication:Name}
This would prevent us from having to create a set of these rules for over 100 applications
You can use placeholders under the rule but Available placeholders (not applicable for entity selector based rules)
But if you want to iterate through different applications you can add the rules using the Settings Objects API and using a script to iterate the app names in your rules.
12 Feb 2026 05:35 PM
OK thanks for this @DanielS ! I have applied the rules for one of our applications, We are seeing it properly apply rules to the services immediately related to the Web App, but the other tags are not being applied as expected. Services -> Services, Service -> Host, etc. Do the rules I supplied above look right? Anything else i can look into?
As for using the API to create the rules, that is exactly how i am approaching this. Was hoping for a cleaner solution where we would only see one Tag Rule that had something like Application: {WebApplication.Name} and could then use that same placeholder in the entitySelectors. Doesn't sound like that is possible?
Featured Posts