|
| 1 | +--- |
| 2 | +layout: "" |
| 3 | +page_title: calculated_mobile_metric Resource - terraform-provider-dynatrace" |
| 4 | +subcategory: "Mobile & Custom Applications" |
| 5 | +description: |- |
| 6 | + The resource `calculated_mobile_metric` covers configuration for calculated mobile/custom app metrics |
| 7 | +--- |
| 8 | + |
| 9 | +# calculated_mobile_metric (Resource) |
| 10 | + |
| 11 | +-> This resource requires the API token scopes **Read configuration** (`ReadConfig`) and **Write configuration** (`WriteConfig`) |
| 12 | + |
| 13 | +## Dynatrace Documentation |
| 14 | + |
| 15 | +- Create calculated metrics for mobile applications - https://www.dynatrace.com/support/help/platform-modules/digital-experience/mobile-applications/additional-configuration/rum-calculated-metrics-mobile |
| 16 | + |
| 17 | +- Mobile app metrics API - https://www.dynatrace.com/support/help/dynatrace-api/configuration-api/calculated-metrics/mobile-app-metrics |
| 18 | + |
| 19 | +## Export Example Usage |
| 20 | + |
| 21 | +- `terraform-provider-dynatrace -export calculated_mobile_metric` downloads all existing calculated mobile/custom app metric configuration |
| 22 | + |
| 23 | +The full documentation of the export feature is available [here](https://registry.terraform.io/providers/dynatrace-oss/dynatrace/latest/docs/guides/export-v2). |
| 24 | + |
| 25 | +## Resource Example Usage |
| 26 | + |
| 27 | +```terraform |
| 28 | +resource "dynatrace_calculated_mobile_metric" "#name#" { |
| 29 | + name = "#name#" |
| 30 | + enabled = true |
| 31 | + app_identifier = "MOBILE_APPLICATION-7F6AE72450E14F11" |
| 32 | + metric_key = "calc:apps.mobile.#name#" |
| 33 | + metric_type = "USER_ACTION_DURATION" |
| 34 | + dimensions { |
| 35 | + dimension { |
| 36 | + dimension = "APP_VERSION" |
| 37 | + top_x = 10 |
| 38 | + } |
| 39 | + } |
| 40 | +} |
| 41 | +``` |
| 42 | + |
| 43 | +<!-- schema generated by tfplugindocs --> |
| 44 | +## Schema |
| 45 | + |
| 46 | +### Required |
| 47 | + |
| 48 | +- `app_identifier` (String) The Dynatrace entity ID of the application to which the metric belongs. |
| 49 | +- `enabled` (Boolean) The metric is enabled (`true`) or disabled (`false`) |
| 50 | +- `metric_key` (String) The unique key of the calculated mobile/custom app metric. |
| 51 | +- `metric_type` (String) The type of the metric. Possible values: [ REPORTED_ERROR_COUNT, USER_ACTION_DURATION, WEB_REQUEST_COUNT, WEB_REQUEST_ERROR_COUNT ] |
| 52 | +- `name` (String) The displayed name of the metric. |
| 53 | + |
| 54 | +### Optional |
| 55 | + |
| 56 | +- `description` (String) Descriptor of a calculated mobile/custom app metric. |
| 57 | +- `dimensions` (Block List) Parameters of a definition of a calculated mobile/custom app metric. (see [below for nested schema](#nestedblock--dimensions)) |
| 58 | +- `user_action_filter` (Block List, Max: 1) Parameters of a definition of a calculated mobile/custom app metric. (see [below for nested schema](#nestedblock--user_action_filter)) |
| 59 | + |
| 60 | +### Read-Only |
| 61 | + |
| 62 | +- `id` (String) The ID of this resource. |
| 63 | + |
| 64 | +<a id="nestedblock--dimensions"></a> |
| 65 | +### Nested Schema for `dimensions` |
| 66 | + |
| 67 | +Optional: |
| 68 | + |
| 69 | +- `dimension` (Block List) A dimensions for the metric usage (see [below for nested schema](#nestedblock--dimensions--dimension)) |
| 70 | + |
| 71 | +<a id="nestedblock--dimensions--dimension"></a> |
| 72 | +### Nested Schema for `dimensions.dimension` |
| 73 | + |
| 74 | +Required: |
| 75 | + |
| 76 | +- `dimension` (String) The dimension of the metric. Possible values are `ApdexType`, `Browser`, `ErrorContext`, `ErrorOrigin`, `ErrorType`, `GeoLocation`, `StringProperty`, `UserActionType` |
| 77 | +- `top_x` (Number) The number of top values to be calculated |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | +<a id="nestedblock--user_action_filter"></a> |
| 82 | +### Nested Schema for `user_action_filter` |
| 83 | + |
| 84 | +Optional: |
| 85 | + |
| 86 | +- `action_duration_from_milliseconds` (Number) Only actions with a duration more than or equal to this value (in milliseconds) are included in the metric calculation. |
| 87 | +- `action_duration_to_milliseconds` (Number) Only actions with a duration less than or equal to this value (in milliseconds) are included in the metric calculation. |
| 88 | +- `apdex` (String) Only actions with the specified Apdex score are included in the metric calculation. Possible values: [ Frustrated, Satisfied, Tolerating, Unknown ] |
| 89 | +- `app_version` (String) Only actions coming from this app version are included in the metric calculation. |
| 90 | +- `carrier` (String) Only actions coming from this carrier type are included in the metric calculation. |
| 91 | +- `city` (String) Only actions of users from this city are included in the metric calculation. Specify geolocation ID here. |
| 92 | +- `connection_type` (String) Only actions coming from this connection type are included in the metric calculation. Possible values: [ LAN, MOBILE, OFFLINE, UNKNOWN, WIFI ] |
| 93 | +- `continent` (String) Only actions of users from this continent are included in the metric calculation. Specify geolocation ID here. |
| 94 | +- `country` (String) Only actions of users from this country are included in the metric calculation. Specify geolocation ID here. |
| 95 | +- `device` (String) Only actions coming from this app version are included in the metric calculation. |
| 96 | +- `has_http_error` (Boolean) The request error status of the actions to be included in the metric calculation: `true` or `false` |
| 97 | +- `has_reported_error` (Boolean) The error status of the actions to be included in the metric calculation: `true` or `false` |
| 98 | +- `isp` (String) Only actions coming from this internet service provider are included in the metric calculation. |
| 99 | +- `manufacturer` (String) Only actions coming from devices of this manufacturer are included in the metric calculation. |
| 100 | +- `network_technology` (String) Filter by network technology |
| 101 | +- `orientation` (String) Only actions coming from devices with this display orientation are included in the metric calculation. Possible values: [ LANDSCAPE, PORTRAIT, UNKNOWN ] |
| 102 | +- `os_family` (String) Only actions coming from this OS family are included in the metric calculation. |
| 103 | +- `os_version` (String) Only actions coming from this OS version are included in the metric calculation. |
| 104 | +- `region` (String) Only actions of users from this region are included in the metric calculation. Specify geolocation ID here. |
| 105 | +- `resolution` (String) Only actions coming from devices with this display resolution are included in the metric calculation. Possible values: [ CGA, DCI2K, DCI4K, DVGA, FHD, FWVGA, FWXGA, GHDPlus, HD, HQVGA, HQVGA2, HSXGA, HUXGA, HVGA, HXGA, NTSC, PAL, QHD, QQVGA, QSXGA, QUXGA, QVGA, QWXGA, QXGA, SVGA, SXGA, SXGAMinus, SXGAPlus, UGA, UHD16K, UHD4K, UHD8K, UHDPlus, UNKNOWN, UWQHD, UXGA, VGA, WHSXGA, WHUXGA, WHXGA, WQSXGA, WQUXGA, WQVGA, WQVGA2, WQVGA3, WQXGA, WQXGA2, WSVGA, WSVGA2, WSXGA, WSXGAPlus, WUXGA, WVGA, WVGA2, WXGA, WXGA2, WXGA3, WXGAPlus, XGA, XGAPLUS, _1280x854, nHD, qHD ] |
| 106 | +- `user_action_name` (String) Only actions with this name are included in the metric calculation. |
| 107 | + |
0 commit comments