18 Oct 2021 02:53 PM - last edited on 19 Oct 2021 08:45 AM by MaciejNeumann
We are creating custom business metrics using the metrics API v2.
Before, when sending custom metrics with API v1 we used to tag the custom device and we could use those tags for alerting profile filters.
I might have missed it but I'm unsure if it's possible to tag the v2 kind of metric.
Has anyone done something similar, how do you set up the tagging rules?
Solved! Go to Solution.
19 Oct 2021 02:08 PM
If you are having troubles tagging them via custom device, you can always revert to the entity selector and tag them from that standpoint. The entity selector allows you to set a tag for any entity in Dynatrace. https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/entity-selector/
22 Oct 2021 12:13 AM - edited 22 Oct 2021 12:14 AM
Extending what Chad said, you might want to look at the new generic entity model. Basic workflow is:
You can see your soda cans by going to abc123.live.dynatrace.com/ui/entity/list/entity:sodacan
22 Oct 2021 10:32 AM
The generic entity model looks interesting.
So I assume we cannot tag the metric directly but define a custom entity type that matches the dimension we send in order to create the entity we tag.
I'll start digging deeper into it, thank you.
24 Oct 2021 11:27 PM
Hi Conal,
Correct. In this case you'd define a new generic entity called sodacan and set the extractionrule to be some string (in my case sodacanid)
Then whenever you pass a metric, a new entity (think of an object in OOP) will be automatically created based on that unique ID.
Feel free to reach out on email (firstname.lastname @ dynatrace.com) if you want to describe your setup in more detail privately.