question

Rajesh S. avatar image
Rajesh S. asked ·

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

6.5uemjavascriptmobile monitoringadkandroid
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Bert H. avatar image
Bert H. answered ·

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.

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Rajesh S. avatar image
Rajesh S. answered ·

@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.

3 comments Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Hello Rajesh,

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

Regards,

Babar

0 Likes 0 · ·

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.

0 Likes 0 · ·

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

0 Likes 0 · ·
Dominik P. avatar image
Dominik P. answered ·

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

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Babar Q. avatar image
Babar Q. answered ·

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

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Dave M. avatar image
Dave M. answered ·

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

1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

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!

0 Likes 0 · ·