We want to filter results from v2/metrics/query using process, host, process, processgroup or services etc using params present in dimensionMap.
We need filtering based on process, process group, services, hosts and applications.
So for host filtering this entitySelector worked
Where ABCD is dt.entity.host.name in dimensionMap.
So how can i filter all other types of elements monitored by dynatrace?
In below examples I want data of Real users only
"User type": "Real users",
To filter only above data I queried using api : /api/v2/metrics/query?metricSelector=builtin:apps.web.action.apdex:names&entitySelector=type("APPLICATION"),entityName.equals("Real users")&from=1652853660000&to=1652940060000&resolution=60m
But getting no data.
So what and all allowed values for entitySelector=type()
First to answer your question you can find all available types by using the API which is detailed here https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/get-all-entity-types
Secondly, looking at your query the entity selector part is not where you would filter for real users as far as I know. I tried this out in my own environment and you would filter for real users in the metric selector portion of the query like so:
builtin:apps.web.action.apdex:filter(eq("User type","Real users"))
Lastly the correct type for this would be:
You can tell by looking at the dimension map where we have dt.entity.application_method. What comes after dt.entity should be the entity type which can be used for the entity selector.