Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14270] Android: Add support for New Relic module

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-06-21T23:52:52.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 13 Core, 2013 Sprint 13, Release 3.1.2, Release 3.2.0
ComponentsAndroid
Labelsmodule_android, qe-testadded
ReporterIngo Muschenetz
AssigneeIngo Muschenetz
Created2013-06-18T18:02:00.000+0000
Updated2013-07-10T09:04:21.000+0000

Description

This change modifies the Android builder script to look for the New Relic module, and if present passes an additional argument to the dx command when it is called. This allows New Relic to do bytecode rewriting for instrumentation. The Java agent argument to dx is passed via a temporary file to avoid issues the dx command has with spaces in file paths. This temporary file is cleaned up after dx runs.

Comments

  1. Ingo Muschenetz 2013-06-18

    PR is https://github.com/appcelerator/titanium_mobile/pull/4399. The module is located for https://www.dropbox.com/s/ql7znupcmbamoqn/ti.newrelic-android-0.1.zip for testing purposes.
  2. Jared Stanbrough 2013-06-18

    Hi all, Steps to test: 1. Copy and unzip the ti.newrelic-android-0.1.zip zipfile into your Titanium SDK directory, with other modules. 2. Register the module with your application by editing tiapp.xml and adding the module. ti.newrelic 3. Build an Android project, i.e. titanium build --platform android 4. If builder.py found the newrelic module, there will be an INFO log entry which says "Adding New Relic Support." You will also see an additional argument passed to the dexer (-Jjavaagent) 5. The rest of the build should proceed as normal and the builder test is verified. To perform a full end to end test of the module: In the test android project's alloy.js add: require('ti.newrelic').start("AA9a2d52a0ed09d8ca54e6317d9c92074f2e9b307b"); When the app runs, there should be some newrelic messages in logcat. Please let me know if you have any questions. Thanks! Jared Stanbrough Senior Engineer, Mobile New Relic, Inc.
  3. Sabil Rahim 2013-06-24

    3_1_X PR https://github.com/appcelerator/titanium_mobile/pull/4411
  4. Darren Haligas 2013-06-26

    @Jared when will the modules for NewRelic on iOS and Android be available to Titanium?
  5. Priya Agarwal 2013-07-10

    Verified with: Titanium sdk: 3.1.2.v20130708163051 Studio: 3.1.2.201307031935 acs:1.0.3 alloy:1.1.3 npm:1.2.14 titanium:3.1.1 titanium-code-processor:1.0.1 OS: Mountain Lion 10.8

JSON Source