• Home
  • Dynatrace API
  • Environment
  • Settings
  • Schemas
  • User session custom metrics

Settings API - User session custom metrics schema table

User session custom metrics (builtin:custom-metrics)

With user-session custom metrics (see documentation), you can extract business-level KPI metrics from user session data. Metrics can then be saved as timeseries and consumed (without interpolation) by your custom charts, alerting mechanisms or the Metrics REST API.

To explore collected metrics, go to Data explorer.

To create a custom event based on a custom metric, go to Custom events for alerting.

Schema IDSchema groupsScope
builtin:custom-metrics
  • group:web-and-mobile-monitoring
  • group:web-and-mobile-monitoring.usql-custom-metrics
environment
Retrieve schema via Settings API
GETManagedhttps://{your-domain}/e/{your-environment-id}/api/v2/settings/schemas/builtin:custom-metrics
SaaShttps://{your-environment-id}.live.dynatrace.com/api/v2/settings/schemas/builtin:custom-metrics
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/v2/settings/schemas/builtin: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

PropertyLabelTypeDescriptionRequired
enabledEnable custom metricboolean-required
metricKeyMetric keytext-required
valueValue type to be extractedMetricValue

Defines the type of value to be extracted from the user session. When using User session counter, the number of user sessions is counted (similar to count(*) when using USQL). When using User session field value, the value of a user session field is extracted.

required
dimensionsAdd a dimensionlist

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 "browserFamily", "userType", "country". For example, using "userType" as a dimension allows you to split chart data based on user types.

required
filtersAdd a filterlist

Defines the filters for the user session. 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 "userType equals REAL_USER" will give you only data from real users, while forcing the synthetic sessions to be ignored.

required

Request body objects

The MetricValue object
PropertyLabelTypeDescriptionRequired
type-enum-required
fieldNameField nametext-required
The Filter object
PropertyLabelTypeDescriptionRequired
fieldNameField nametext-required
operatorOperatorenum-required
valueValuetext-required
valueInValueslist-required