Remove obsolete check

We are no longer using UrlConnection to send traces
This commit is contained in:
Nikolay Martynov 2019-08-14 16:46:31 -04:00
parent b0ff861392
commit 63cd73e79e
1 changed files with 0 additions and 13 deletions

View File

@ -80,19 +80,6 @@ public class HttpUrlConnectionInstrumentation extends Instrumenter.Default {
final HttpUrlState state = contextStore.putIfAbsent(thiz, HttpUrlState.FACTORY);
synchronized (state) {
/*
* AgentWriter uses HttpURLConnection to report to the trace-agent. We don't want to trace
* those requests. Check after the connected test above because getRequestProperty will
* throw an exception if already connected.
*/
final boolean isTraceRequest =
Thread.currentThread().getName().equals("dd-agent-writer")
|| (!connected && thiz.getRequestProperty("Datadog-Meta-Lang") != null);
if (isTraceRequest) {
state.finish();
return null;
}
final int callDepth = CallDepthThreadLocalMap.incrementCallDepth(HttpURLConnection.class);
if (callDepth > 0) {
return null;