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

Instances of Mobile Intrumentation

Stepu
Visitor

Hello,

My team is currently working on a mobile SDK which we want to include in different apps in the future. We want to monitor our components in dynatrace, but the developers in their tests indicated that it was not possible to create another instance of dynatrace since the App where it is used our SDK is already instrumented with Dynatrace which would be incompatible.
it is possible to have two instances of Dynatrace in the same app?

4 REPLIES 4

Patrick_H
Dynatrace Champion
Dynatrace Champion

Simple answer: no, not possible

Sidenote: if this is not for an SDK that is only used in-house/for apps built by same company as the SDK this might create legal oder privacy related issues

Complex answer: maybe (in theory, untested)

  • this is for iOS only as I do not have that much insights to Android if it could be similar there
  • if it is only for auto-instrumenting UI from the SDK, than it can be added to agent configuration that also linked frameworks are instrumented (DTXInstrumentFrameworks - but be aware this might add some startup time overhead as all frameworks are scanned then)
  • web-requesta will automatically be instrumented
  • if it is about adding custom instrumentation it might be possible to just link but not embed the dynatrace framework - but this has some restrictions as the app using the app using the SDK than must have the correct Dynatrace framework linked (and this will not be possible for static linking) - so this also requires the  in-house use-case, needs strict versioning and possible is error prone for build setup issues
iOS help: https://www.dynatrace.com/support/help/shortlink/ios-hub

Similar to iOS, there can only be one instance of the OneAgent for Android in every Android app. Unfortunately it is not possible to have an independent library instrumentation and report it to different Dynatrace environments or applications.

When the library and app are owned by the same company, then the customer can customize the instrumentation of the library. When the library and app are part of the same Gradle project, then the customer can use the snippets from this documentation section. When they are part of different Gradle project, then the customer can add the OneAgent library as dependency and instrument it. The OneAgent will be automatically started, when the app is auto-instrumented. In this case, the monitored data will be sent to the same Dynatrace mobile applications.

 

Thanks for the answers!

Dynatrace API would be a option for these cases or is there something better?

Thomas_Wirth1
Dynatrace Champion
Dynatrace Champion

The library will be auto-instrumented and therefore the agent is able to monitor user interactions or web requests automatically. For monitoring other parts of the library, we recommend to use the Dynatrace API (Android and iOS).

Featured Posts