Settings API - User action custom metrics schema table
User action custom metrics (builtin:user-action-custom-metrics)
With user action custom metrics (see documentation), you can extract business-level KPI metrics from user action data. Metrics can then be saved as timeseries and consumed (without interpolation) by your custom charts, alerting mechanisms or the Metrics REST API (<your-dynatrace-url>//rest-api-doc/?urls.primaryName=Environment+API+v2#/Metrics
).
To explore collected metrics, go to Data explorer (<your-dynatrace-url>//ui/data-explorer
).
To create a custom event based on a custom metric, go to Custom events for alerting (<your-dynatrace-url>//#settings/anomalydetection/metricevents
).
Schema ID | Schema groups | Scope |
---|---|---|
builtin:user-action-custom-metrics |
| environment |
GET | Managed | https://{your-domain}/e/{your-environment-id}/api/v2/settings/schemas/builtin:user-action-custom-metrics |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/v2/settings/schemas/builtin:user-action-custom-metrics | |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/v2/settings/schemas/builtin:user-action-custom-metrics |
Authentication
To execute this request, you need an access token with Read settings (settings.read
) scope. To learn how to obtain and use it, see Tokens and authentication.
Parameters
Property | Type | Description | Required |
---|---|---|---|
Enable custom metricenabled | boolean | - | required |
Metric keymetricKey | text | - | required |
Value type to be extractedvalue | MetricValue | Defines the type of value to be extracted from the user action. When using user action counter, the number of user actions is counted (similar to count(*) when using USQL). When using user action field value, the value of a user action field is extracted. | required |
Add a dimensiondimensions | list | Defines the fields that are used as dimensions. A dimension is a collection of reference information about a metric data point that is of interest to your business. Dimensions are parameters like "application", "type", "apdexCategory". For example, using "type" as a dimension allows you to split chart data based on the user action type. | required |
Add a filterfilters | Filter[] | Defines the filters for the user action. Filters apply at the moment of extracting the data and only sessions that satisfy the filtering criteria will be used to extract the custom metrics. You will not be able to modify these filters in the metric data explorer. For example, using "type equals Xhr" will give you only data from xhr actions, while forcing the rest of user actions of different types to be ignored. | required |
The MetricValue
object
Property | Type | Description | Required |
---|---|---|---|
type | enum |
| required |
Field namefieldName | text | - | required |
The Filter
object
Property | Type | Description | Required |
---|---|---|---|
Field namefieldName | text | - | required |
Operatoroperator | enum |
| required |
Valuevalue | text | - | required |
ValuesvalueIn | list | - | required |