cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Mobile Application instrumentation with cordova plugin for DynaTrace Managed

Yosi_Neuman
DynaMight Champion
DynaMight Champion

Hi guys,

Prospect running DynaTrace Managed and they are about to add the cordova plugin as describe in https://www.npmjs.com/package/dynatrace-cordova-pl... to their mobile application and they have asked us what should be replace in the followed JSAGENT:

<JSAGENT>
<!-- IMPORTANT TO USE jsInlineScript URL -->
<url>https://XXX.com/api/v1/rum/jsInlineScript/APPLICATION-XXXXX?Api-Token=YOUR_TOKEN</url>
<apitoken>..</apitoken>
</JSAGENT>

1. Instead of the XXX.com the endpoint of their PSGW? (i.e. apm.cal.com) ?
2. Instead of the APPLICATION-XXXXX – their Mobile Application ID (i.e APPLICATION-F9D766111D8BAB65)?
3. Instead of Api-Token Token from the tenant (FeEzEjQKS1SnXZqG2LoJN) or from the server (69DKjNL7QAWknVpx-EZ0A)?

So they come out with tow options:
1. https://apm.cal.com/api/v1/rum/jsInlineScript/APPLICATION-F9D766111D8BAB65?Api-Token= FeEzEjQKS1SnXZqG2LoJN
2. https://apm.cal.com/api/v1/rum/jsInlineScript/APPLICATION-F9D766111D8BAB65?Api-Token=69DKjNL7QAWknVp...
which one of the above should they use or they need to use different one?

and at the end do they need to add something instead of the .. at the <apitoken>..</apitoken>?

Thanks in advance

Yos @gilgi@matrix.co.il

dynatrace certificated professional - dynatrace primer partner - Matrix Soft Ware Division - Israel
8 REPLIES 8

AlexanderSommer
Dynatrace Pro
Dynatrace Pro

Hi Yos, our expert on cordova is out of office till 2. November, but he will reply as soon as he is back.

Hi Alexander,

Thanks for your update.

Prospect was "playing" a bit with the plugin and they have managed to understand the way to set the JSAGENT from the environment and with the application and token but still they have some obstacles to build up the APK because of security issues so they not yet succeed to see web request from Hybrid Mobile Application.

BTW, prospect and us still wonder about:

1. If the web request from the JSagent will be shown in the Mobile App or they need to open another Web Application?

2. What is the use of JavaScript Bridge and do they need it and how its works sending JS data to the PSGW?

November 2nd is not so far a way 🙂 we will be happy to get answers from the expert and help prospect see Mobile Application's web request in this POC and learn for the next ones !

Thanks in advance

Yos

dynatrace certificated professional - dynatrace primer partner - Matrix Soft Ware Division - Israel

matthias_hochri
Dynatrace Pro
Dynatrace Pro

Hi Yos, Sorry I was out of office till today.

First of all I wanted to ask If you are using in the NATIVEAGENT part "<DTXManagedCluster>true</DTXManagedCluster>" because this info is needed for the Mobile Agent to work with managed instances.

Regarding your questions:

  1. Okay I see. Yes you have to open a Web Application. The NPM documentation states "So you must create a web application (to get the JavaScript Agent) and a mobile application (to get the configuration for the Mobile Agent)." So I assume that's why the configuration was hard, because making a JSAgent configuration with a mobile applications is impossible. Maybe after creating a web application this should be much easier for you. So you have two different applications but the actions will all be included in ONE session, so they are technically together.
  2. The JS Bridge is automatically included by the Cordova plugin and is providing a way to manually instrument JS code. The JS Bridge is therefore directly communicating with the Mobile Agent. The Mobile Agent will report the actions.

Hopefully this answers your questions. If they are any left, ask me. I'm glad to help.

gilgi
Mentor

Hi Matthias,

as we saw no data and had problems building the customer's app (file is being used by another process message) we started with a simple hello world example. While we got to a situation in which the web pages user actions are being forwarded, we don't see any activity on the mobile, not even an application load event. If I understand correctly, this might mean we have a problem with the security gateway. is that correct ?

2. Suppose the web pages have been stored not in the traditional www folder, where would the custom definition for the directory location should be placed ?

Gil.

vladislav_samoy
Inactive

Hi gents!

I have the question regarding getting JavaScipt in <JSAGENT>

There is no way to get the access from Internet to Dynatrace Managed installation to download that JS directly from Managed installation using API. How to configure Public ActiveGate to passthru such requests?

It means that URI path in <JSAGENT> will be not Server installation, but Public Active Gate

Thanks in advance


matthias_hochri
Dynatrace Pro
Dynatrace Pro

Hi Vlad, I think it would be better to open a new topic. Nevertheless: So you have already setup the Active Gate? And the dynatrace.config file (which can be downloaded over the WebUI) contains a wrong URL?


Hi!

Native part contains proper URL to Public AG with 9999 port, but JSAGENT URI has a link directly of DynatraceManaged server IP-address


So when you try to use the URL to Public AG with 9999 port instead of the server IP-address in the JSAgent URL - what do you get? You can paste this URL as well in the browser and should get the whole content of the JSAgent.