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

Hybrid App Manual Instrumentation: Visit is being split into two visits

I have performed instrumentation of an Hybrid adroid Single Page (SPA) app based on IBM MF+Cordova+Knockout and other JS technology using Dynatrace ADK 6.5 (dtagent6513_vxjqpt23ra_1014.js - precisely).
I have seen following behaviours and issues explained along (kindy bare with me):

1. When App starts the JS Agent is loaded first in index.html. The agent starts reporting events to 'Default Application' so the 'loading of index.html' is reported first. But after this all the auto-detected events are reported to another custom application tab (as shown in snapshot01). The result is also indicated in snapshot. This visit is actually split into another visit.
So in effect I am having two visits - One reported to 'Default' and other to my custom app.
Clearly, every action and events must be reported to single application, making only one visit. Not split.

2. Another Problem starts occuring when I disable UEM in 'Default Application' tab and enable only in my custom app tab. The auto-detected events stop getting posted (which is exptected too along with custom reported events). DT only get the actions which are explicitly reported by my custom functions(as in the CustomFunction.txt).


3. Only the custom reported events have the Server Side pure path, rest have None!
I am aware I might require to raise support case in the end, but just in case, if anyone can suggest something will be much appreciated.

customfunctions.txt

9 REPLIES 9

dave_mauney
Dynatrace Champion
Dynatrace Champion

Hi Rajesh,

I would concentrate on getting the index.html page mapped to the same application name as your other traffic. Have you tried to set up Applications Mapping in your system profile yet? I would start with a rule like "contains /" to get all traffic into the same application name.

HTH,

dave

Hello Dave, I did unchecked manual application mapping and defined rule for Mobile/Web contains '<mydomainname>' (omitting domain name on purpose) in Apllication Setting But I would definately give "/" it a try. Thanks!

BabarQayyum
Leader

Hello Rajesh,

We had the same situation after instrumenting the same type of application and then we did few following settings to club everything under on single application.


  • Created a logical application for the mobile e.g. ABC and provided the directory name e.g. /XYZ/ as 'contains'
  • Created a specific User Experience for the application ABC

You can also try the above meanwhile someone else can contribute his/her experience.

Regards,

Babar

dominik_punz
Dynatrace Pro
Dynatrace Pro

Hi Rajesh,

you mentioned you manually instrumented your app. If you did not run the Android auto instrumentor you will have to manually register the web views for the mobile agent to be able to communicate with the JS agent that's running inside the web view.

See the doc for details: https://community.dynatrace.com/community/display/...

Dominik

@Dave M. and @Babar Q.

I am still getting the index html in Default. I suspect this might be due to the dynamically loaded JS due to dtagent_bootstrap.js is having app ias Default%20Application. However I am not sure.

Hello Rajesh,

Did you try to use the 'initcode' from the REST API instead of inserting the bootstrap agent?

Regards,

Babar

No, I have not tried that. The PoC was performed earlier with bootstrap way. Now Its deprecated. However, I have created sample web pages to test UEM myself. There too I found my closely loaded pages were being split (even if these had same application). I think this is not related to system profile or app name.

Thanks for suggestion, Babar.

Hello Rajesh,

One more thing which we did on our side to combine all the 'Client' and 'Server' side user actions in the single application and for that purpose we created a logical application and took the 'initcode' from that UE to insert in the index.html as a first script tag in the <head>.

Regards,

Babar

Bert_VanderHeyd
Advisor

We have exactly the same issue.

Both the JS agent (statically injected) and the Mobile ADK for IOS are implemented.
Maybe the reason is the difference in applications. Via the Mobile ADK they are fixed defined inside the App, but what mechanism is used to define the application for the JS ADK? Is it the endpoint to which the beacon is send (dynatraceMonitor) or the endpoint of the REST services the application is calling. It can not be the location of the page since that is wrapped statically inside the App (hybrid app). It also can not be the location of the dtagent javascript, since that to is locally served.