Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import co.elastic.apm.agent.impl.transaction.Span;
import co.elastic.apm.agent.sdk.DynamicTransformer;
import co.elastic.apm.agent.sdk.ElasticApmInstrumentation;
import co.elastic.apm.agent.sdk.weakmap.WeakMapSupplier;
import co.elastic.apm.agent.util.SpanConcurrentHashMap;
import com.blogspot.mydailyjava.weaklockfree.WeakConcurrentMap;
import net.bytebuddy.asm.Advice;
import net.bytebuddy.description.method.MethodDescription;
Expand Down Expand Up @@ -55,7 +55,7 @@ public abstract class AbstractAsyncHttpClientInstrumentation extends TracerAware

public static class Helper {

static final WeakConcurrentMap<AsyncHandler<?>, Span> handlerSpanMap = WeakMapSupplier.createMap();
static final WeakConcurrentMap<AsyncHandler<?>, Span> handlerSpanMap = SpanConcurrentHashMap.createWeakMap();

public static final List<Class<? extends ElasticApmInstrumentation>> ASYNC_HANDLER_INSTRUMENTATIONS = Arrays.<Class<? extends ElasticApmInstrumentation>>asList(
AsyncHandlerOnCompletedInstrumentation.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
package co.elastic.apm.agent.dubbo;

import co.elastic.apm.agent.impl.transaction.AbstractSpan;
import co.elastic.apm.agent.sdk.weakmap.WeakMapSupplier;
import co.elastic.apm.agent.util.SpanConcurrentHashMap;
import com.alibaba.dubbo.remoting.exchange.ResponseCallback;
import com.blogspot.mydailyjava.weaklockfree.WeakConcurrentMap;

public class AlibabaCallbackHolder {
public static final WeakConcurrentMap<ResponseCallback, AbstractSpan<?>> callbackSpanMap = WeakMapSupplier.createMap();
public static final WeakConcurrentMap<ResponseCallback, AbstractSpan<?>> callbackSpanMap = SpanConcurrentHashMap.createWeakMap();
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
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.sdk.weakmap.WeakMapSupplier;
import co.elastic.apm.agent.util.SpanConcurrentHashMap;
import com.blogspot.mydailyjava.weaklockfree.WeakConcurrentMap;

import javax.annotation.Nonnull;
Expand All @@ -33,7 +33,7 @@
*/
class ProcessHelper {

private static final ProcessHelper INSTANCE = new ProcessHelper(WeakMapSupplier.<Process, Span>createMap());
private static final ProcessHelper INSTANCE = new ProcessHelper(SpanConcurrentHashMap.<Process, Span>createWeakMap());

private final WeakConcurrentMap<Process, Span> inFlightSpans;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import co.elastic.apm.agent.bci.TracerAwareInstrumentation;
import co.elastic.apm.agent.impl.transaction.Span;
import co.elastic.apm.agent.sdk.weakmap.WeakMapSupplier;
import co.elastic.apm.agent.util.SpanConcurrentHashMap;
import com.blogspot.mydailyjava.weaklockfree.WeakConcurrentMap;
import com.lambdaworks.redis.protocol.RedisCommand;
import net.bytebuddy.matcher.ElementMatcher;
Expand All @@ -31,7 +31,8 @@
import static co.elastic.apm.agent.bci.bytebuddy.CustomElementMatchers.classLoaderCanLoadClass;

public abstract class Lettuce34Instrumentation extends TracerAwareInstrumentation {
static final WeakConcurrentMap<RedisCommand<?, ?, ?>, Span> commandToSpan = WeakMapSupplier.createMap();

static final WeakConcurrentMap<RedisCommand<?, ?, ?>, Span> commandToSpan = SpanConcurrentHashMap.createWeakMap();

/**
* We don't support Lettuce up to version 3.3, as the {@link RedisCommand#getType()} method is missing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import co.elastic.apm.agent.bci.TracerAwareInstrumentation;
import co.elastic.apm.agent.impl.transaction.Span;
import co.elastic.apm.agent.redis.RedisSpanUtils;
import co.elastic.apm.agent.sdk.weakmap.WeakMapSupplier;
import co.elastic.apm.agent.util.SpanConcurrentHashMap;
import com.blogspot.mydailyjava.weaklockfree.WeakConcurrentMap;
import io.lettuce.core.protocol.RedisCommand;
import net.bytebuddy.asm.Advice;
Expand All @@ -46,7 +46,7 @@
*/
public class Lettuce5StartSpanInstrumentation extends TracerAwareInstrumentation {

static final WeakConcurrentMap<RedisCommand<?, ?, ?>, Span> commandToSpan = WeakMapSupplier.createMap();
static final WeakConcurrentMap<RedisCommand<?, ?, ?>, Span> commandToSpan = SpanConcurrentHashMap.createWeakMap();

@Override
public ElementMatcher<? super TypeDescription> getTypeMatcher() {
Expand Down