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

OkHttp3 Support for Mobile UEM (Android)

arihant_polavar
Dynatrace Pro
Dynatrace Pro

Hello,

We are trying to use auto-instrumentation to instrument the Android builds for my client. They use OkHttp to make calls to the internal servers (which we have AppMon Java Agents on).

We've tried using the auto instrumentation for the AppMon 6.5 ADK but it does not appear to work. We still do not see calls made through OkHttp and only see Third Party calls as part of the visits.

The release notes mention Retrofit2/OkHttp3 is now supported for 6.5 but the client recently upgraded to OkHttp 3.4.1 (from 2.5 for this specific reason) and they do not use Retrofit. They are also NOT obfuscating the OkHttp packages.

Any ideas what might be going on?

We've tried implementing a custom interceptor on older version (6.2 and 6.3) but they do not appear to be working as expected either. We were really confident that using the 6.5 adk would help with the instrumentation.

Thank you,

Ari

7 REPLIES 7

Joe_Hoffman
Dynatrace Champion
Dynatrace Champion

If you don't get an answer to your question, I suggest you create a support case.

Thomas_Wirth1
Dynatrace Pro
Dynatrace Pro

The release notes are misleading. The auto-instrumentor only instruments retrofit2 web request (which are based on the okhttp3 lib). The release note page has already been updated (see the

Mobile ADK section at https://community.dynatrace.com/community/display/DOCDT65/System+requirements ).

The custom okhttp interceptor only tags web request. It does not generate a web request event (that is sent by the agent). The tag can be detected on the server side.

Thanks for the info Thomas.

Are there any plans to support OkHTTP requests in the future?

There will be an evaluation for the okhttp3 library. If a future version of the auto-instrumentor will support the okhttp framework depends on the result of this evaluation.

arihant_polavar
Dynatrace Pro
Dynatrace Pro

Just an FYI for anyone for runs into this issue while we wait to find out if we will support the OkHttp Framework in future releases.

I had to open a support case but we were able to figure out a way to capture OkHttp Requests and have them show up in the User Action PurePaths.

Our custom interceptor was correctly tagging web requests but to make this work, you also need to time the web requests.

Here is a link to the support case which gives you more detail on how to do this -> https://support.dynatrace.com/supportportal/browse...

Hope this helps anyone who might run into this issue.

Thanks,

Ari

florian_ortner
Dynatrace Advisor
Dynatrace Advisor

Development of
OkHttp3 support (without need for retrofit) is currently in progress, if we do
not hit any major obstacles it looks good for making it into 7.0 GA

That is some awesome news :), my client (and others I'm sure) will love this. Does this mean it will be supported by auto-instrumentation and we won't require adding a custom interceptor and timer?

Thank you,

Ari