cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Tagging a service using a value from a service that is calling it

MariusNicolae
Participant

Hi everyone,

 

We are trying to create one automatic tagging rule to tag one of our services that is being called by a lot of other services that belong to different applications.

So it would be really handy if we could use one rule to tag the service with the name of the application of which the services that call it belong to (I really hope this makes sense)

 

What I did at first to see which services talk to this service was make a rule like this

MariusNicolae_0-1655301690422.png

So I tagged every service that was calling my "WsHelper" service with "WsHelper".

But now the client asked if we can tag this service using a property of the services that call this service.

For example on all of our services we have a rule that applies the application value

MariusNicolae_1-1655301789459.png

For example this is a service that calls our interested service, we can see it's tagged with WsHelper because it calls the WsHelper service.

But my question is, can we apply the "Point:Applicazione" tag also to the WsHelper service?

Can we use an entity selector to extract this value from the service that is calling our service?

This is what the structure of the tags for this service (ContropartiService) looks like

MariusNicolae_2-1655301969028.png

And I tried using variations of the example in the documentation here https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/entity-selector#tag but I couldn't get it to work the way I want it to, I only managed to tag with WsHelper the services that have the tag "Point:Applicazione" which is not useful in my case, because I would want to tag the WsHelper service with the tag that has the format of "[ApplicationNameAsKey]:Application", but I don't see if there is a way of doing this.

 

We are trying to do this in order to avoid having to add a rule to every existing tag rule just for this but try to only have one rule so it can be as dynamic as possible.

 

Thank you so much!

Best regards

1 REPLY 1

techean
Dynatrace Pro
Dynatrace Pro

Hey, tri using api to get all services tagged with WShelper, 

If you have some data set to compare you can write a python code using pandas to map needful tags.

Also further write a script to append additional required tags against those services. That's what I can think of now.

KG