{ "id": "171396", "key": "MOD-2407", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10034", "key": "MOD", "name": "Appcelerator Modules", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "20186", "name": "appcelerator.apm 3.1.2", "archived": false, "released": false } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-06-11T20:41:14.000+0000", "created": "2018-03-23T20:57:27.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-08-06T17:49:28.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14561", "name": "APM" } ], "description": "Hello,\r\n\r\nWhile doing some performance testing we came to notice that the setMetadata function seems not to log any integer values to the Appcelerator Dashboard in iOS, but this works fine in Android. However, the Appcelerator documentation says this function takes a String or Integer as its value parameter: https://docs.appcelerator.com/platform/latest/#!/api/Modules.Performance-method-setMetadata\r\n\r\nThe version of the APM we're using is 3.1.0 for both Android and iOS, but all of these tests were executed in simulators/emulators. \r\n\r\n*Sample app/Test code:* https://propelics.box.com/s/jyzrh9l4gmz3hr1hf6veibtln8dedc4b \r\n\r\n*Steps to reproduce*: \r\n\r\n1) In the sample app open index.js and observe how clicking in the label on the screen should add a username (JohnDoe) and some metadata (two strings and two integers) to the apm. \r\n2) Make sure you modify the tiapp.xml with valid Appcelerator Platform GUID and Keys for the APM module to work. \r\n3) Run the app on iOS. \r\n4) When app launches, click on the \"Click me!\" label. \r\n5) Look up for the app at http://dashboard.appcelerator.com \r\n6) Look up for the user JohnDoe in the Performance tab, and select that user \r\n7) Observe the metadata values, as only the string values will show there. \r\n8) Additionally, run the application on Android. \r\n9) When the app launches, click on the \"Click me!\" label. \r\n10) Look up for the app at http://dashboard.appcelerator.com \r\n11) Look up for the user JohnDoe (the one corresponding to Android) in the Performance tab and select it \r\n12) All the metadata values will be there, including the integer ones. \r\n\r\nThanks", "attachment": [], "flagged": false, "summary": "iOS: apm.setMetadata(key, val) won't work in iOS if val is an integer", "creator": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "subtasks": [], "reporter": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "environment": "APM module, iOS", "comment": { "comments": [ { "id": "435883", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The underlaying Crittercism SDK only supports String values in its native libraries (actually both iOS and Android). Android likely stringifys the values, but iOS errors before. We could stringify it internally, but doing the same on the javaScript side would likely be easier, e.g. {{apm.setMetadata('Key3', String(10));}}. In summary, here are the possible options:\r\n# Stringify on the client-side, see above. Also update the docs to state the accepted parameters\r\n# Stringify on the module-side, requires a minor module update\r\n# Reach out to Crittercism to also allow \"native\" numbers\r\n\r\nLet us know what's preferred!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-03-24T14:45:05.000+0000", "updated": "2018-03-24T21:32:35.000+0000" }, { "id": "436070", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey there! We have decided to simply make it work on iOS like it does for Android. Using APM 3.1.1 and later, you will be able to pass either a Number or a String. If a Number is passed, it is stringified to be sent to the Crittercism portal.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-03-29T10:04:14.000+0000", "updated": "2018-03-29T10:04:14.000+0000" }, { "id": "436073", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator-modules/appcelerator.apm/pull/33\r\n\r\nCould be shipped together with the changes from TIMOB-25913 (cc [~gmathews])", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-03-29T10:14:02.000+0000", "updated": "2018-03-29T10:14:02.000+0000" }, { "id": "440182", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:49:28.000+0000", "updated": "2018-08-06T17:49:28.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }