You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for taking the time for reporting an issue!
Describe what happened
When OkHttp is initialized before the DD SDK and one of the TracingInterceptors is used, any "known hosts" set in the SDK Configuration aren't picked up by the interceptor(s) and those requests ultimately aren't traced in APM. This happens with the newer, non-deprecated Interceptor constructors that don't take in a list of known hosts (e.g. here).
Steps to reproduce the issue:
I've modified the sample app in my own fork to reproduce this issue (commit here):
Create an OkHttpClient with a TracedRequestListener and no known hosts provided.
Set known hosts in the DD SDK Configuration
Initialize the OkHttpClientbefore the DD SDK
Add the expected hostname as a known host (e.g. "unsplash.com" in this case)
Run the sample, go to the image loader and choose Picasso as the load type
Load image; If you debug within TracingInterceptor you'll notice that tracing is not enabled and FirstPartyHostDetector.knownHosts is empty
This can be avoided by using the deprecated Interceptor constructor(s) that take in the list of known hosts when constructing the OkHttpClient, but I'd rather not rely on deprecated functionality if it will be removed in the future.
EDIT: This doesn't seem to work any more with v1.8.0 🤔 however, providing the known hosts into the Interceptor used to work in prior SDK versions.
Describe what you expected:
I expect to be able to construct my OkHttpClient earlier than the DD SDK and still have APM/RUM tracing work properly.
(we initialize OkHttp earlier than any of our dependencies since its used by almost everything).
If the DD SDK must be initialized first, I need an initialization callback to be notified when the SDK is finished initializing (see issue Callback when SDK is fully initialized? #511).
Hello @erawhctim , and thanks for reporting this issue. It's been fixed and will be available in version 1.8.1 (which should be available soon). Let us know if upgrading your dependency solves this issue
Thanks for taking the time for reporting an issue!
Describe what happened
When
OkHttp
is initialized before the DD SDK and one of theTracingInterceptor
s is used, any "known hosts" set in the SDK Configuration aren't picked up by the interceptor(s) and those requests ultimately aren't traced in APM. This happens with the newer, non-deprecated Interceptor constructors that don't take in a list of known hosts (e.g. here).Steps to reproduce the issue:
I've modified the sample app in my own fork to reproduce this issue (commit here):
TracedRequestListener
and no known hosts provided.OkHttpClient
before the DD SDKTracingInterceptor
you'll notice that tracing is not enabled andFirstPartyHostDetector.knownHosts
is emptyThis can be avoided by using the deprecated Interceptor constructor(s) that take in the list of known hosts when constructing theOkHttpClient
, but I'd rather not rely on deprecated functionality if it will be removed in the future.EDIT: This doesn't seem to work any more with v1.8.0 🤔 however, providing the known hosts into the Interceptor used to work in prior SDK versions.
Describe what you expected:
OkHttpClient
earlier than the DD SDK and still have APM/RUM tracing work properly.OkHttp
earlier than any of our dependencies since its used by almost everything).Additional context
The text was updated successfully, but these errors were encountered: