27 Oct 2017 11:04 AM - last edited on 19 May 2023 08:53 AM by Michal_Gebacki
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
Solved! Go to Solution.
30 Oct 2017 11:53 AM
Hi Yos, our expert on cordova is out of office till 2. November, but he will reply as soon as he is back.
30 Oct 2017 01:33 PM
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
02 Nov 2017 09:12 AM
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:
Hopefully this answers your questions. If they are any left, ask me. I'm glad to help.
04 Nov 2017 01:27 PM
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.
05 Nov 2018 01:05 PM
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
05 Nov 2018 02:35 PM
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?
05 Nov 2018 02:37 PM
Hi!
Native part contains proper URL to Public AG with 9999 port, but JSAGENT URI has a link directly of DynatraceManaged server IP-address
05 Nov 2018 02:42 PM
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.