|
1106 | 1106 | if (template && template.events && template.events.length) { |
1107 | 1107 | events = events.concat(this.getEvent(null, template.events[0])); |
1108 | 1108 | } |
1109 | | - req = {timestamp: this.ts, begin_session: 1, metrics: this.metrics, user_details: this.userdetails, events: events, apm: this.getTrace(), ignore_cooldown: '1'}; |
| 1109 | + req = {timestamp: this.ts, begin_session: 1, metrics: this.metrics, user_details: this.userdetails, events: events, ignore_cooldown: '1'}; |
1110 | 1110 | req.events = req.events.concat(this.getHeatmapEvents()); |
1111 | 1111 | req.events = req.events.concat(this.getFeedbackEvents()); |
1112 | 1112 | req.events = req.events.concat(this.getScrollmapEvents()); |
| 1113 | + if (_featuresToPopulate.includes("performance-monitoring")) { |
| 1114 | + req.apm = this.getTrace(); |
| 1115 | + } |
1113 | 1116 | } |
1114 | 1117 | else { |
1115 | 1118 | events = this.getEvent("[CLY]_view", template && template.events && template.events["[CLY]_view"], this.ts, true) |
|
1120 | 1123 | if (template && template.events && template.events.length) { |
1121 | 1124 | events = events.concat(this.getEvent(null, template.events[0])); |
1122 | 1125 | } |
1123 | | - req = {timestamp: this.ts, begin_session: 1, events: events, apm: this.getTrace(), ignore_cooldown: '1'}; |
| 1126 | + req = {timestamp: this.ts, begin_session: 1, events: events, ignore_cooldown: '1'}; |
| 1127 | + if (_featuresToPopulate.includes("performance-monitoring")) { |
| 1128 | + req.apm = this.getTrace(); |
| 1129 | + } |
1124 | 1130 | } |
1125 | 1131 |
|
1126 | 1132 | if (Math.random() > 0.10) { |
|
1130 | 1136 | req[this.platform.toLowerCase() + "_token"] = randomString(8); |
1131 | 1137 | } |
1132 | 1138 |
|
1133 | | - if (Math.random() > 0.50) { |
| 1139 | + if (Math.random() > 0.50 && _featuresToPopulate.includes("crashes")) { |
1134 | 1140 | req.crash = this.getCrash(); |
1135 | 1141 | } |
1136 | 1142 |
|
|
1336 | 1342 | var abExampleCount = 1; |
1337 | 1343 | var abExampleName = "Pricing"; |
1338 | 1344 | var _templateType = ''; |
| 1345 | + var _allFeatures = ["ab-testing", "attribution", "cohorts", "crashes", "funnels", "performance-monitoring", "push", "star-rating", "surveys"]; |
1339 | 1346 | var _featuresToPopulate = []; |
1340 | 1347 | var runCount = 0; |
1341 | 1348 | var completedRequestCount = 0; |
|
2518 | 2525 | } |
2519 | 2526 | } |
2520 | 2527 |
|
2521 | | - if (countlyGlobal.plugins.indexOf('crash_symbolication') !== -1 && countlyAuth.validateCreate('crash_symbolication') && _featuresToPopulate.includes("crash_symbolication")) { |
| 2528 | + if (countlyGlobal.plugins.indexOf('crash_symbolication') !== -1 && countlyAuth.validateCreate('crash_symbolication') && _featuresToPopulate.includes("crashes")) { |
2522 | 2529 | const crashPlatforms = Object.keys(crashSymbolVersions).filter(key => crashSymbolVersions[key].length); |
2523 | 2530 |
|
2524 | 2531 |
|
|
2592 | 2599 | }; |
2593 | 2600 |
|
2594 | 2601 | countlyPopulator.setSelectedFeatures = function(value) { |
2595 | | - _featuresToPopulate = value; |
| 2602 | + _featuresToPopulate = (value === "all") ? _allFeatures : value; |
2596 | 2603 | }; |
2597 | 2604 |
|
2598 | 2605 | countlyPopulator.getTemplate = function(templateId, callback) { |
|
0 commit comments