[TIMOB-17046] CLI: Analytics fails to send if event data greater than 8KB
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-06-20T21:36:28.000+0000 |
Affected Version/s | Release 3.3.0 |
Fix Version/s | Release 3.3.0, Release 3.4.0 |
Components | CLI |
Labels | module_cli, qe-testadded |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2014-05-30T05:16:21.000+0000 |
Updated | 2014-06-27T20:59:25.000+0000 |
Description
With the introduction of TIMOB-16617, we can now collect Titanium API usage, however the data generated is greater than 8KB which is causing issues when forking the analytics send process.
The Titanium CLI needs to move the sending of analytics from the
process.on('exit')
event to a callback that is fired after the command finishes.
We also need to rework node-appc's analytics library so that the parent process writes the analytics events to disk, then forks the analytics send process with the minimal amount of data.
node-appc master pull request: https://github.com/appcelerator/node-appc/pull/93 Titanium CLI master pull request: https://github.com/appcelerator/titanium/pull/139 Titanium CLI 3_3_X pull request: https://github.com/appcelerator/titanium/pull/140 To test, *you MUST build a Titanium SDK that has TIMOB-16617*, then build an app for various platforms:
Analytics are sent, but:
ti config
no longer shows the cli.sendAPIUsage variable initially, though once you set it withti config cli.sendAPIUsage true
you see the variable withti config
ti config
never exits, nor doesti sdk select
orti build
You have to press Ctrl-C to break out. It doesn't matter if you add additional arguments (like doingti config cli.sendAPIUsage true
you still have to Ctrl-C out). Adding --config \{cli:\{analytics: \{debug:true}}} doesn't seem to do anything. With or without it, I had to add the console.log(payload) statement to analytics.js as described in the earlier comment to see any analytics output.[~skypanther] As with all Titanium CLI config options, if the config option does not explicitly exist, then the default is used. Just to be clear, you need to running the Titanium CLI from git with my changes and then put the node-appc from git (plus my changes) in the Titanium CLI's node_modules directory and make sure the npm dependencies are installed:
Now you should be able to run the CLI and the analytics will be sent correctly.
So generate larger than 8KB of data, you must use a TiSDK that includes the PR from TIMOB-16617 and do a production/dist build.
Works as described
Verified on: Mac OSX 10.9.3 Appcelerator Studio, build: 3.3.0.201406231625 Titanium SDK, build: 3.3.0.v20140627094114 Titanium CLI, build: 3.3.0-rc3 Alloy: 1.4.0-rc2 Used KitchenSink to generate and send large Analytic data. Data sent successfully. Closing.