Switching to SpanConcurrentHashMap in HttpUrlConnection instr
package co.elastic.apm.agent.urlconnection;
import co.elastic.apm.agent.bci.TracerAwareInstrumentation;
+import co.elastic.apm.agent.collections.WeakConcurrentProviderImpl;
import co.elastic.apm.agent.http.client.HttpClientHelper;
import co.elastic.apm.agent.impl.transaction.AbstractSpan;
import co.elastic.apm.agent.impl.transaction.Outcome;
import co.elastic.apm.agent.impl.transaction.Span;
import co.elastic.apm.agent.impl.transaction.TraceContext;
-import co.elastic.apm.agent.sdk.weakconcurrent.WeakConcurrent;
import co.elastic.apm.agent.sdk.weakconcurrent.WeakMap;
import net.bytebuddy.asm.Advice;
import net.bytebuddy.description.NamedElement;
@@ -47,7 +47,7 @@ import static net.bytebuddy.matcher.ElementMatchers.takesArguments;
public abstract class HttpUrlConnectionInstrumentation extends TracerAwareInstrumentation {
- private static final WeakMap<HttpURLConnection, Span> inFlightSpans = WeakConcurrent.buildMap();
+ private static final WeakMap<HttpURLConnection, Span> inFlightSpans = WeakConcurrentProviderImpl.createWeakSpanMap();
@Override
public Collection<String> getInstrumentationGroupNames() {
