From 1339aa41e3070b8750c30e148b9581e922d5a529 Mon Sep 17 00:00:00 2001 From: qxz15oi Date: Fri, 7 May 2021 15:32:35 +0200 Subject: [PATCH] mobile config --- tools/mobileConfig/README.md | 54 +++++ tools/mobileConfig/config.ini | 14 ++ .../MOBILE_APPLICATION-1FD55938A63C43BA.json | 16 ++ .../userActionAndSessionProperties.json | 102 +++++++++ .../MOBILE_APPLICATION-21A9592CADC54C37.json | 16 ++ .../userActionAndSessionProperties.json | 102 +++++++++ .../MOBILE_APPLICATION-80051BA2B2484DEC.json | 16 ++ .../userActionAndSessionProperties.json | 4 + .../MOBILE_APPLICATION-B9A52D06BCC64906.json | 16 ++ .../userActionAndSessionProperties.json | 4 + .../MOBILE_APPLICATION-BD5E6D01E0E64555.json | 16 ++ .../userActionAndSessionProperties.json | 102 +++++++++ .../MOBILE_APPLICATION-EC17924E243B4995.json | 16 ++ .../userActionAndSessionProperties.json | 102 +++++++++ tools/mobileConfig/mobileConfig.py | 199 ++++++++++++++++++ tools/providerBreakdown/providerBreakdown.py | 5 +- .../serviceDetectionApi.py | 15 +- 17 files changed, 790 insertions(+), 9 deletions(-) create mode 100644 tools/mobileConfig/README.md create mode 100644 tools/mobileConfig/config.ini create mode 100644 tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-1FD55938A63C43BA/MOBILE_APPLICATION-1FD55938A63C43BA.json create mode 100644 tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-1FD55938A63C43BA/userActionAndSessionProperties/userActionAndSessionProperties.json create mode 100644 tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-21A9592CADC54C37/MOBILE_APPLICATION-21A9592CADC54C37.json create mode 100644 tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-21A9592CADC54C37/userActionAndSessionProperties/userActionAndSessionProperties.json create mode 100644 tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-80051BA2B2484DEC/MOBILE_APPLICATION-80051BA2B2484DEC.json create mode 100644 tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-80051BA2B2484DEC/userActionAndSessionProperties/userActionAndSessionProperties.json create mode 100644 tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-B9A52D06BCC64906/MOBILE_APPLICATION-B9A52D06BCC64906.json create mode 100644 tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-B9A52D06BCC64906/userActionAndSessionProperties/userActionAndSessionProperties.json create mode 100644 tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-BD5E6D01E0E64555/MOBILE_APPLICATION-BD5E6D01E0E64555.json create mode 100644 tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-BD5E6D01E0E64555/userActionAndSessionProperties/userActionAndSessionProperties.json create mode 100644 tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-EC17924E243B4995/MOBILE_APPLICATION-EC17924E243B4995.json create mode 100644 tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-EC17924E243B4995/userActionAndSessionProperties/userActionAndSessionProperties.json create mode 100644 tools/mobileConfig/mobileConfig.py diff --git a/tools/mobileConfig/README.md b/tools/mobileConfig/README.md new file mode 100644 index 00000000..57508bd8 --- /dev/null +++ b/tools/mobileConfig/README.md @@ -0,0 +1,54 @@ +### Provider Breakdown Configuration + +- Dynatrace automatically recognizes more than 1,000 3rd-party content providers, including Google, Amazon, Twitter, and LinkedIn. +Typical 3rd-party content includes Facebook and Twitter widgets, gravatars, and similar resources. +It's worth monitoring this type of content to know exactly how it affects your applications and to understand if such content is the root cause of any page slow-downs. +- This extesions allows you to set up rules that define how your applications' downloaded content resources (images, CSS, 3rd party widgets, and more) are displayed +and categorized for analysis. +- This extension allows you to keep the configuration consistent accross all tenants + +#### Download configuration + +1. Configure *config.ini* file: + ``` + downloadConfig = 1 + updateConfig = 0 + ``` +2. Run the script: + ``` + python providerBreakdown.py + ``` +3. The configuration will appear under */data//contentResources/contentResources.json* + + +#### Create configuration + +*Use case: A team wants to create a new provider breakdown rule* + +1. Configure *config.ini* file: + ``` + downloadConfig = 0 + updateConfig = 1 + ``` +2. Edit the file */data//contentResources/contentResources.json* adding the desired rule. For example: + ``` + { + "resourceName": "OneLogin (Prod)", + "resourceType": "FIRST_PARTY_RESOURCES", + "brandIconUrl": "https://empty", + "domainNamePatterns": [ + "customer.bmwgroup.com" + ] + } + ``` +3. Run the script: + ``` + python providerBreakdown.py + ``` + +#### Delete configuration + +1. Same process as before: + - access the JSON + - delete the target rule + - run the update \ No newline at end of file diff --git a/tools/mobileConfig/config.ini b/tools/mobileConfig/config.ini new file mode 100644 index 00000000..97ff1edd --- /dev/null +++ b/tools/mobileConfig/config.ini @@ -0,0 +1,14 @@ +[ENDPOINT] +endpoint = /api/config/v1/applications/mobile + +[ACTION] +downloadConfig = 1 +updateConfig = 0 + +[TENANTS] +#tenant1 = https://dynatracemgd-cn.bmwgroup.net/e/b921f1b9-c00e-4031-b9d1-f5a0d530757b CN_PreProd_TOKEN +#tenant2 = https://dynatracemgd-cn.bmwgroup.net/e/ab88c03b-b7fc-45f0-9115-9e9ecc0ced35 CN_Prod_TOKEN +#tenant3 = https://xxu26128.live.dynatrace.com xxu26128_TOKEN +#tenant4 = https://wgv50241.live.dynatrace.com wgv50241_TOKEN +tenant5 = https://qqk70169.live.dynatrace.com qqk70169_TOKEN +#tenant6 = https://onb44935.live.dynatrace.com onb44935_TOKEN \ No newline at end of file diff --git a/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-1FD55938A63C43BA/MOBILE_APPLICATION-1FD55938A63C43BA.json b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-1FD55938A63C43BA/MOBILE_APPLICATION-1FD55938A63C43BA.json new file mode 100644 index 00000000..7660acd3 --- /dev/null +++ b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-1FD55938A63C43BA/MOBILE_APPLICATION-1FD55938A63C43BA.json @@ -0,0 +1,16 @@ +{ + "identifier": "MOBILE_APPLICATION-1FD55938A63C43BA", + "name": "Mobile 2.0 MINI - ROW DST INT (iOS & Android)", + "applicationType": "MOBILE_APPLICATION", + "applicationId": "1fd55938-a63c-43ba-8413-de3dfe92b497", + "costControlUserSessionPercentage": 100, + "apdexSettings": { + "toleratedThreshold": 3000, + "frustratingThreshold": 12000, + "frustratedOnError": true + }, + "optInModeEnabled": true, + "sessionReplayEnabled": true, + "sessionReplayOnCrashEnabled": true, + "beaconEndpointType": "CLUSTER_ACTIVE_GATE" +} \ No newline at end of file diff --git a/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-1FD55938A63C43BA/userActionAndSessionProperties/userActionAndSessionProperties.json b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-1FD55938A63C43BA/userActionAndSessionProperties/userActionAndSessionProperties.json new file mode 100644 index 00000000..6f117762 --- /dev/null +++ b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-1FD55938A63C43BA/userActionAndSessionProperties/userActionAndSessionProperties.json @@ -0,0 +1,102 @@ +{ + "sessionProperties": [ + { + "key": "vehicle_year", + "displayName": "vehicle_year" + }, + { + "key": "vehicle_telematicsunit", + "displayName": "vehicle_telematicsunit" + }, + { + "key": "vehicle_pustep", + "displayName": "vehicle_pustep" + }, + { + "key": "vehicle_model", + "displayName": "vehicle_model" + }, + { + "key": "vehicle_istep", + "displayName": "vehicle_istep" + }, + { + "key": "vehicle_islcssupported", + "displayName": "vehicle_islcssupported" + }, + { + "key": "vehicle_hmiversion", + "displayName": "vehicle_hmiversion" + }, + { + "key": "vehicle_headunit", + "displayName": "vehicle_headunit" + }, + { + "key": "vehicle_drivetrain", + "displayName": "vehicle_drivetrain" + }, + { + "key": "vehicle_brand", + "displayName": "vehicle_brand" + }, + { + "key": "vehicle_bodytype", + "displayName": "vehicle_bodytype" + }, + { + "key": "app_version_build", + "displayName": "app_version_build" + } + ], + "userActionProperties": [ + { + "key": "vehicle_year", + "displayName": "vehicle_year" + }, + { + "key": "vehicle_telematicsunit", + "displayName": "vehicle_telematicsunit" + }, + { + "key": "vehicle_pustep", + "displayName": "vehicle_pustep" + }, + { + "key": "vehicle_model", + "displayName": "vehicle_model" + }, + { + "key": "vehicle_istep", + "displayName": "vehicle_istep" + }, + { + "key": "vehicle_islcssupported", + "displayName": "vehicle_islcssupported" + }, + { + "key": "vehicle_hmiversion", + "displayName": "vehicle_hmiversion" + }, + { + "key": "vehicle_headunit", + "displayName": "vehicle_headunit" + }, + { + "key": "vehicle_drivetrain", + "displayName": "vehicle_drivetrain" + }, + { + "key": "vehicle_brand", + "displayName": "vehicle_brand" + }, + { + "key": "vehicle_bodytype", + "displayName": "vehicle_bodytype" + }, + { + "key": "app_version_build", + "displayName": "app_version_build" + } + ] +} \ No newline at end of file diff --git a/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-21A9592CADC54C37/MOBILE_APPLICATION-21A9592CADC54C37.json b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-21A9592CADC54C37/MOBILE_APPLICATION-21A9592CADC54C37.json new file mode 100644 index 00000000..fc43fb72 --- /dev/null +++ b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-21A9592CADC54C37/MOBILE_APPLICATION-21A9592CADC54C37.json @@ -0,0 +1,16 @@ +{ + "identifier": "MOBILE_APPLICATION-21A9592CADC54C37", + "name": "Mobile 2.0 BMW - ROW DST INT (iOS & Android)", + "applicationType": "MOBILE_APPLICATION", + "applicationId": "21a9592c-adc5-4c37-9192-b9a79fff6108", + "costControlUserSessionPercentage": 100, + "apdexSettings": { + "toleratedThreshold": 60000, + "frustratingThreshold": 60000, + "frustratedOnError": true + }, + "optInModeEnabled": true, + "sessionReplayEnabled": false, + "sessionReplayOnCrashEnabled": true, + "beaconEndpointType": "CLUSTER_ACTIVE_GATE" +} \ No newline at end of file diff --git a/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-21A9592CADC54C37/userActionAndSessionProperties/userActionAndSessionProperties.json b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-21A9592CADC54C37/userActionAndSessionProperties/userActionAndSessionProperties.json new file mode 100644 index 00000000..070a49e6 --- /dev/null +++ b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-21A9592CADC54C37/userActionAndSessionProperties/userActionAndSessionProperties.json @@ -0,0 +1,102 @@ +{ + "sessionProperties": [ + { + "key": "vehicle_model", + "displayName": "vehicle_model" + }, + { + "key": "app_version_build", + "displayName": "app_version_build" + }, + { + "key": "vehicle_brand", + "displayName": "vehicle_brand" + }, + { + "key": "vehicle_year", + "displayName": "vehicle_year" + }, + { + "key": "vehicle_islcssupported", + "displayName": "vehicle_isLcsSupported" + }, + { + "key": "vehicle_headunit", + "displayName": "vehicle_headUnit" + }, + { + "key": "vehicle_pustep", + "displayName": "vehicle_puStep" + }, + { + "key": "vehicle_telematicsunit", + "displayName": "vehicle_telematicsUnit" + }, + { + "key": "vehicle_istep", + "displayName": "vehicle_iStep" + }, + { + "key": "vehicle_drivetrain", + "displayName": "vehicle_driveTrain" + }, + { + "key": "vehicle_hmiversion", + "displayName": "vehicle_hmiVersion" + }, + { + "key": "vehicle_bodytype", + "displayName": "vehicle_bodyType" + } + ], + "userActionProperties": [ + { + "key": "vehicle_model", + "displayName": "vehicle_model" + }, + { + "key": "app_version_build", + "displayName": "app_version_build" + }, + { + "key": "vehicle_brand", + "displayName": "vehicle_brand" + }, + { + "key": "vehicle_year", + "displayName": "vehicle_year" + }, + { + "key": "vehicle_islcssupported", + "displayName": "vehicle_isLcsSupported" + }, + { + "key": "vehicle_headunit", + "displayName": "vehicle_headUnit" + }, + { + "key": "vehicle_pustep", + "displayName": "vehicle_puStep" + }, + { + "key": "vehicle_telematicsunit", + "displayName": "vehicle_telematicsUnit" + }, + { + "key": "vehicle_istep", + "displayName": "vehicle_iStep" + }, + { + "key": "vehicle_drivetrain", + "displayName": "vehicle_driveTrain" + }, + { + "key": "vehicle_hmiversion", + "displayName": "vehicle_hmiVersion" + }, + { + "key": "vehicle_bodytype", + "displayName": "vehicle_bodyType" + } + ] +} \ No newline at end of file diff --git a/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-80051BA2B2484DEC/MOBILE_APPLICATION-80051BA2B2484DEC.json b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-80051BA2B2484DEC/MOBILE_APPLICATION-80051BA2B2484DEC.json new file mode 100644 index 00000000..d8c659b3 --- /dev/null +++ b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-80051BA2B2484DEC/MOBILE_APPLICATION-80051BA2B2484DEC.json @@ -0,0 +1,16 @@ +{ + "identifier": "MOBILE_APPLICATION-80051BA2B2484DEC", + "name": "Mobile 2 - DevOps Sandbox", + "applicationType": "MOBILE_APPLICATION", + "applicationId": "80051ba2-b248-4dec-b8ae-7d82cc01e801", + "costControlUserSessionPercentage": 100, + "apdexSettings": { + "toleratedThreshold": 3000, + "frustratingThreshold": 12000, + "frustratedOnError": true + }, + "optInModeEnabled": true, + "sessionReplayEnabled": false, + "sessionReplayOnCrashEnabled": true, + "beaconEndpointType": "CLUSTER_ACTIVE_GATE" +} \ No newline at end of file diff --git a/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-80051BA2B2484DEC/userActionAndSessionProperties/userActionAndSessionProperties.json b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-80051BA2B2484DEC/userActionAndSessionProperties/userActionAndSessionProperties.json new file mode 100644 index 00000000..922d7c0d --- /dev/null +++ b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-80051BA2B2484DEC/userActionAndSessionProperties/userActionAndSessionProperties.json @@ -0,0 +1,4 @@ +{ + "sessionProperties": [], + "userActionProperties": [] +} \ No newline at end of file diff --git a/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-B9A52D06BCC64906/MOBILE_APPLICATION-B9A52D06BCC64906.json b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-B9A52D06BCC64906/MOBILE_APPLICATION-B9A52D06BCC64906.json new file mode 100644 index 00000000..ad3451e3 --- /dev/null +++ b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-B9A52D06BCC64906/MOBILE_APPLICATION-B9A52D06BCC64906.json @@ -0,0 +1,16 @@ +{ + "identifier": "MOBILE_APPLICATION-B9A52D06BCC64906", + "name": "Mobile 2.0 Toyota - ROW DST INT (iOS & Android)", + "applicationType": "MOBILE_APPLICATION", + "applicationId": "b9a52d06-bcc6-4906-8f2f-b2eb997cafd2", + "costControlUserSessionPercentage": 100, + "apdexSettings": { + "toleratedThreshold": 3000, + "frustratingThreshold": 12000, + "frustratedOnError": true + }, + "optInModeEnabled": true, + "sessionReplayEnabled": true, + "sessionReplayOnCrashEnabled": true, + "beaconEndpointType": "CLUSTER_ACTIVE_GATE" +} \ No newline at end of file diff --git a/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-B9A52D06BCC64906/userActionAndSessionProperties/userActionAndSessionProperties.json b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-B9A52D06BCC64906/userActionAndSessionProperties/userActionAndSessionProperties.json new file mode 100644 index 00000000..922d7c0d --- /dev/null +++ b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-B9A52D06BCC64906/userActionAndSessionProperties/userActionAndSessionProperties.json @@ -0,0 +1,4 @@ +{ + "sessionProperties": [], + "userActionProperties": [] +} \ No newline at end of file diff --git a/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-BD5E6D01E0E64555/MOBILE_APPLICATION-BD5E6D01E0E64555.json b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-BD5E6D01E0E64555/MOBILE_APPLICATION-BD5E6D01E0E64555.json new file mode 100644 index 00000000..050a3d50 --- /dev/null +++ b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-BD5E6D01E0E64555/MOBILE_APPLICATION-BD5E6D01E0E64555.json @@ -0,0 +1,16 @@ +{ + "identifier": "MOBILE_APPLICATION-BD5E6D01E0E64555", + "name": "Mobile 2.0 MINI - KR DST INT (iOS & Android)", + "applicationType": "MOBILE_APPLICATION", + "applicationId": "bd5e6d01-e0e6-4555-8786-62292fb34526", + "costControlUserSessionPercentage": 100, + "apdexSettings": { + "toleratedThreshold": 3000, + "frustratingThreshold": 12000, + "frustratedOnError": true + }, + "optInModeEnabled": true, + "sessionReplayEnabled": true, + "sessionReplayOnCrashEnabled": true, + "beaconEndpointType": "CLUSTER_ACTIVE_GATE" +} \ No newline at end of file diff --git a/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-BD5E6D01E0E64555/userActionAndSessionProperties/userActionAndSessionProperties.json b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-BD5E6D01E0E64555/userActionAndSessionProperties/userActionAndSessionProperties.json new file mode 100644 index 00000000..6f117762 --- /dev/null +++ b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-BD5E6D01E0E64555/userActionAndSessionProperties/userActionAndSessionProperties.json @@ -0,0 +1,102 @@ +{ + "sessionProperties": [ + { + "key": "vehicle_year", + "displayName": "vehicle_year" + }, + { + "key": "vehicle_telematicsunit", + "displayName": "vehicle_telematicsunit" + }, + { + "key": "vehicle_pustep", + "displayName": "vehicle_pustep" + }, + { + "key": "vehicle_model", + "displayName": "vehicle_model" + }, + { + "key": "vehicle_istep", + "displayName": "vehicle_istep" + }, + { + "key": "vehicle_islcssupported", + "displayName": "vehicle_islcssupported" + }, + { + "key": "vehicle_hmiversion", + "displayName": "vehicle_hmiversion" + }, + { + "key": "vehicle_headunit", + "displayName": "vehicle_headunit" + }, + { + "key": "vehicle_drivetrain", + "displayName": "vehicle_drivetrain" + }, + { + "key": "vehicle_brand", + "displayName": "vehicle_brand" + }, + { + "key": "vehicle_bodytype", + "displayName": "vehicle_bodytype" + }, + { + "key": "app_version_build", + "displayName": "app_version_build" + } + ], + "userActionProperties": [ + { + "key": "vehicle_year", + "displayName": "vehicle_year" + }, + { + "key": "vehicle_telematicsunit", + "displayName": "vehicle_telematicsunit" + }, + { + "key": "vehicle_pustep", + "displayName": "vehicle_pustep" + }, + { + "key": "vehicle_model", + "displayName": "vehicle_model" + }, + { + "key": "vehicle_istep", + "displayName": "vehicle_istep" + }, + { + "key": "vehicle_islcssupported", + "displayName": "vehicle_islcssupported" + }, + { + "key": "vehicle_hmiversion", + "displayName": "vehicle_hmiversion" + }, + { + "key": "vehicle_headunit", + "displayName": "vehicle_headunit" + }, + { + "key": "vehicle_drivetrain", + "displayName": "vehicle_drivetrain" + }, + { + "key": "vehicle_brand", + "displayName": "vehicle_brand" + }, + { + "key": "vehicle_bodytype", + "displayName": "vehicle_bodytype" + }, + { + "key": "app_version_build", + "displayName": "app_version_build" + } + ] +} \ No newline at end of file diff --git a/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-EC17924E243B4995/MOBILE_APPLICATION-EC17924E243B4995.json b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-EC17924E243B4995/MOBILE_APPLICATION-EC17924E243B4995.json new file mode 100644 index 00000000..7ce4e799 --- /dev/null +++ b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-EC17924E243B4995/MOBILE_APPLICATION-EC17924E243B4995.json @@ -0,0 +1,16 @@ +{ + "identifier": "MOBILE_APPLICATION-EC17924E243B4995", + "name": "Mobile 2.0 BMW - KR DST INT (iOS & Android)", + "applicationType": "MOBILE_APPLICATION", + "applicationId": "ec17924e-243b-4995-a992-fae1a05955ad", + "costControlUserSessionPercentage": 100, + "apdexSettings": { + "toleratedThreshold": 3000, + "frustratingThreshold": 12000, + "frustratedOnError": true + }, + "optInModeEnabled": true, + "sessionReplayEnabled": true, + "sessionReplayOnCrashEnabled": true, + "beaconEndpointType": "CLUSTER_ACTIVE_GATE" +} \ No newline at end of file diff --git a/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-EC17924E243B4995/userActionAndSessionProperties/userActionAndSessionProperties.json b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-EC17924E243B4995/userActionAndSessionProperties/userActionAndSessionProperties.json new file mode 100644 index 00000000..6f117762 --- /dev/null +++ b/tools/mobileConfig/data/qqk70169.live.dynatrace.com/mobile/MOBILE_APPLICATION-EC17924E243B4995/userActionAndSessionProperties/userActionAndSessionProperties.json @@ -0,0 +1,102 @@ +{ + "sessionProperties": [ + { + "key": "vehicle_year", + "displayName": "vehicle_year" + }, + { + "key": "vehicle_telematicsunit", + "displayName": "vehicle_telematicsunit" + }, + { + "key": "vehicle_pustep", + "displayName": "vehicle_pustep" + }, + { + "key": "vehicle_model", + "displayName": "vehicle_model" + }, + { + "key": "vehicle_istep", + "displayName": "vehicle_istep" + }, + { + "key": "vehicle_islcssupported", + "displayName": "vehicle_islcssupported" + }, + { + "key": "vehicle_hmiversion", + "displayName": "vehicle_hmiversion" + }, + { + "key": "vehicle_headunit", + "displayName": "vehicle_headunit" + }, + { + "key": "vehicle_drivetrain", + "displayName": "vehicle_drivetrain" + }, + { + "key": "vehicle_brand", + "displayName": "vehicle_brand" + }, + { + "key": "vehicle_bodytype", + "displayName": "vehicle_bodytype" + }, + { + "key": "app_version_build", + "displayName": "app_version_build" + } + ], + "userActionProperties": [ + { + "key": "vehicle_year", + "displayName": "vehicle_year" + }, + { + "key": "vehicle_telematicsunit", + "displayName": "vehicle_telematicsunit" + }, + { + "key": "vehicle_pustep", + "displayName": "vehicle_pustep" + }, + { + "key": "vehicle_model", + "displayName": "vehicle_model" + }, + { + "key": "vehicle_istep", + "displayName": "vehicle_istep" + }, + { + "key": "vehicle_islcssupported", + "displayName": "vehicle_islcssupported" + }, + { + "key": "vehicle_hmiversion", + "displayName": "vehicle_hmiversion" + }, + { + "key": "vehicle_headunit", + "displayName": "vehicle_headunit" + }, + { + "key": "vehicle_drivetrain", + "displayName": "vehicle_drivetrain" + }, + { + "key": "vehicle_brand", + "displayName": "vehicle_brand" + }, + { + "key": "vehicle_bodytype", + "displayName": "vehicle_bodytype" + }, + { + "key": "app_version_build", + "displayName": "app_version_build" + } + ] +} \ No newline at end of file diff --git a/tools/mobileConfig/mobileConfig.py b/tools/mobileConfig/mobileConfig.py new file mode 100644 index 00000000..d349f2cd --- /dev/null +++ b/tools/mobileConfig/mobileConfig.py @@ -0,0 +1,199 @@ +import os, requests, time, json, sys, logging, configparser +from datetime import datetime, timedelta +from http.cookies import SimpleCookie +from pathlib import Path + +def checkAPIlimit(): + global number_of_calls + print("API calls: ", str(number_of_calls+1)) + if number_of_calls == 59: + print("Sleeping") + time.sleep(60) + number_of_calls=0 + +def saveValues(): + YOUR_DT_API_URL = tenant_info.split(" ")[0].rstrip('\n') + YOUR_DT_API_TOKEN = tenant_info.split(" ")[1].rstrip('\n') + + return YOUR_DT_API_URL, YOUR_DT_API_TOKEN + + +def getList(): + print('Iterate through list? y/n') + iterate = input() + if iterate == 'y': + print('Enter the key of the object:') + jsonKey = input() + else: + jsonKey = None + return iterate, jsonKey + +def download(): + #Create /data folder + endpointLast = endpoint + if "/" in endpoint: + endpointLast = endpoint.split("/")[-1] + directory="data/"+env_id+"/"+endpointLast + Path(directory).mkdir(parents=True, exist_ok=True) + + print(''.join(YOUR_DT_API_URL) + endpoint) + r = requests.get(''.join(YOUR_DT_API_URL) + endpoint, headers=headers, cookies=dict(cookies), verify=False); + + data_json = json.loads(r.text) + iterate = False + for key in data_json.keys(): + if type(data_json[key]) is list: + if "id" in data_json[key][0]: + iterate = True + iterative_key = key + + if iterate == True: + i=0 + while i