Remove tracer where unused (#130429)
This commit is contained in:
parent
f6d233eaf0
commit
f9d96dc4c4
|
@ -117,7 +117,7 @@ class NodeServiceProvider {
|
|||
Tracer tracer,
|
||||
String nodeId
|
||||
) {
|
||||
return new TransportService(settings, transport, threadPool, interceptor, localNodeFactory, clusterSettings, taskManager, tracer);
|
||||
return new TransportService(settings, transport, threadPool, interceptor, localNodeFactory, clusterSettings, taskManager);
|
||||
}
|
||||
|
||||
HttpServerTransport newHttpTransport(PluginsService pluginsService, NetworkModule networkModule) {
|
||||
|
|
|
@ -16,7 +16,6 @@ import org.elasticsearch.core.Releasables;
|
|||
import org.elasticsearch.tasks.CancellableTask;
|
||||
import org.elasticsearch.tasks.Task;
|
||||
import org.elasticsearch.tasks.TaskManager;
|
||||
import org.elasticsearch.telemetry.tracing.Tracer;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
|
@ -33,7 +32,6 @@ public class RequestHandlerRegistry<Request extends TransportRequest> implements
|
|||
private final boolean canTripCircuitBreaker;
|
||||
private final Executor executor;
|
||||
private final TaskManager taskManager;
|
||||
private final Tracer tracer;
|
||||
private final Writeable.Reader<Request> requestReader;
|
||||
@SuppressWarnings("unused") // only accessed via #STATS_TRACKER_HANDLE, lazy initialized because instances consume non-trivial heap
|
||||
private TransportActionStatsTracker statsTracker;
|
||||
|
@ -56,8 +54,7 @@ public class RequestHandlerRegistry<Request extends TransportRequest> implements
|
|||
TransportRequestHandler<Request> handler,
|
||||
Executor executor,
|
||||
boolean forceExecution,
|
||||
boolean canTripCircuitBreaker,
|
||||
Tracer tracer
|
||||
boolean canTripCircuitBreaker
|
||||
) {
|
||||
this.action = action;
|
||||
this.requestReader = requestReader;
|
||||
|
@ -66,7 +63,6 @@ public class RequestHandlerRegistry<Request extends TransportRequest> implements
|
|||
this.canTripCircuitBreaker = canTripCircuitBreaker;
|
||||
this.executor = executor;
|
||||
this.taskManager = taskManager;
|
||||
this.tracer = tracer;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
|
@ -126,8 +122,7 @@ public class RequestHandlerRegistry<Request extends TransportRequest> implements
|
|||
handler,
|
||||
registry.executor,
|
||||
registry.forceExecution,
|
||||
registry.canTripCircuitBreaker,
|
||||
registry.tracer
|
||||
registry.canTripCircuitBreaker
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@ import org.elasticsearch.node.NodeClosedException;
|
|||
import org.elasticsearch.node.ReportingService;
|
||||
import org.elasticsearch.tasks.Task;
|
||||
import org.elasticsearch.tasks.TaskManager;
|
||||
import org.elasticsearch.telemetry.tracing.Tracer;
|
||||
import org.elasticsearch.threadpool.Scheduler;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
|
||||
|
@ -134,7 +133,6 @@ public class TransportService extends AbstractLifecycleComponent
|
|||
// tracer log
|
||||
|
||||
private static final Logger tracerLog = Loggers.getLogger(logger, ".tracer");
|
||||
private final Tracer tracer;
|
||||
|
||||
volatile String[] tracerLogInclude;
|
||||
volatile String[] tracerLogExclude;
|
||||
|
@ -206,18 +204,6 @@ public class TransportService extends AbstractLifecycleComponent
|
|||
}
|
||||
};
|
||||
|
||||
public TransportService(
|
||||
Settings settings,
|
||||
Transport transport,
|
||||
ThreadPool threadPool,
|
||||
TransportInterceptor transportInterceptor,
|
||||
Function<BoundTransportAddress, DiscoveryNode> localNodeFactory,
|
||||
@Nullable ClusterSettings clusterSettings,
|
||||
Set<String> taskHeaders
|
||||
) {
|
||||
this(settings, transport, threadPool, transportInterceptor, localNodeFactory, clusterSettings, taskHeaders, Tracer.NOOP);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the service.
|
||||
*
|
||||
|
@ -232,8 +218,7 @@ public class TransportService extends AbstractLifecycleComponent
|
|||
TransportInterceptor transportInterceptor,
|
||||
Function<BoundTransportAddress, DiscoveryNode> localNodeFactory,
|
||||
@Nullable ClusterSettings clusterSettings,
|
||||
TaskManager taskManager,
|
||||
Tracer tracer
|
||||
TaskManager taskManager
|
||||
) {
|
||||
this(
|
||||
settings,
|
||||
|
@ -243,8 +228,7 @@ public class TransportService extends AbstractLifecycleComponent
|
|||
localNodeFactory,
|
||||
clusterSettings,
|
||||
new ClusterConnectionManager(settings, transport, threadPool.getThreadContext()),
|
||||
taskManager,
|
||||
tracer
|
||||
taskManager
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -256,8 +240,7 @@ public class TransportService extends AbstractLifecycleComponent
|
|||
TransportInterceptor transportInterceptor,
|
||||
Function<BoundTransportAddress, DiscoveryNode> localNodeFactory,
|
||||
@Nullable ClusterSettings clusterSettings,
|
||||
Set<String> taskHeaders,
|
||||
Tracer tracer
|
||||
Set<String> taskHeaders
|
||||
) {
|
||||
this(
|
||||
settings,
|
||||
|
@ -267,8 +250,7 @@ public class TransportService extends AbstractLifecycleComponent
|
|||
localNodeFactory,
|
||||
clusterSettings,
|
||||
new ClusterConnectionManager(settings, transport, threadPool.getThreadContext()),
|
||||
new TaskManager(settings, threadPool, taskHeaders),
|
||||
tracer
|
||||
new TaskManager(settings, threadPool, taskHeaders)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -281,15 +263,13 @@ public class TransportService extends AbstractLifecycleComponent
|
|||
Function<BoundTransportAddress, DiscoveryNode> localNodeFactory,
|
||||
@Nullable ClusterSettings clusterSettings,
|
||||
ConnectionManager connectionManager,
|
||||
TaskManager taskManger,
|
||||
Tracer tracer
|
||||
TaskManager taskManger
|
||||
) {
|
||||
this.transport = transport;
|
||||
transport.setSlowLogThreshold(TransportSettings.SLOW_OPERATION_THRESHOLD_SETTING.get(settings));
|
||||
this.threadPool = threadPool;
|
||||
this.localNodeFactory = localNodeFactory;
|
||||
this.connectionManager = connectionManager;
|
||||
this.tracer = tracer;
|
||||
this.clusterName = ClusterName.CLUSTER_NAME_SETTING.get(settings);
|
||||
setTracerLogInclude(TransportSettings.TRACE_LOG_INCLUDE_SETTING.get(settings));
|
||||
setTracerLogExclude(TransportSettings.TRACE_LOG_EXCLUDE_SETTING.get(settings));
|
||||
|
@ -1214,8 +1194,7 @@ public class TransportService extends AbstractLifecycleComponent
|
|||
handler,
|
||||
executor,
|
||||
false,
|
||||
true,
|
||||
tracer
|
||||
true
|
||||
);
|
||||
transport.registerRequestHandler(reg);
|
||||
}
|
||||
|
@ -1247,8 +1226,7 @@ public class TransportService extends AbstractLifecycleComponent
|
|||
handler,
|
||||
executor,
|
||||
forceExecution,
|
||||
canTripCircuitBreaker,
|
||||
tracer
|
||||
canTripCircuitBreaker
|
||||
);
|
||||
transport.registerRequestHandler(reg);
|
||||
}
|
||||
|
|
|
@ -194,8 +194,7 @@ public abstract class TaskManagerTestCase extends ESTestCase {
|
|||
TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||
boundTransportAddressDiscoveryNodeFunction,
|
||||
null,
|
||||
taskManager,
|
||||
Tracer.NOOP
|
||||
taskManager
|
||||
);
|
||||
taskManager.setTaskCancellationService(new TaskCancellationService(transportService));
|
||||
transportService.start();
|
||||
|
|
|
@ -28,7 +28,6 @@ import org.elasticsearch.features.FeatureService;
|
|||
import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
|
||||
import org.elasticsearch.monitor.StatusInfo;
|
||||
import org.elasticsearch.tasks.TaskManager;
|
||||
import org.elasticsearch.telemetry.tracing.Tracer;
|
||||
import org.elasticsearch.test.ESTestCase;
|
||||
import org.elasticsearch.test.MockLog;
|
||||
import org.elasticsearch.test.junit.annotations.TestLogging;
|
||||
|
@ -74,8 +73,7 @@ public class JoinHelperTests extends ESTestCase {
|
|||
x -> localNode,
|
||||
clusterSettings,
|
||||
new ClusterConnectionManager(Settings.EMPTY, capturingTransport, threadPool.getThreadContext()),
|
||||
taskManger,
|
||||
Tracer.NOOP
|
||||
taskManger
|
||||
);
|
||||
JoinHelper joinHelper = new JoinHelper(
|
||||
null,
|
||||
|
@ -241,8 +239,7 @@ public class JoinHelperTests extends ESTestCase {
|
|||
x -> localNode,
|
||||
clusterSettings,
|
||||
new ClusterConnectionManager(Settings.EMPTY, capturingTransport, threadPool.getThreadContext()),
|
||||
taskManger,
|
||||
Tracer.NOOP
|
||||
taskManger
|
||||
);
|
||||
AtomicReference<StatusInfo> nodeHealthServiceStatus = new AtomicReference<>(new StatusInfo(UNHEALTHY, "unhealthy-info"));
|
||||
JoinHelper joinHelper = new JoinHelper(
|
||||
|
@ -319,8 +316,7 @@ public class JoinHelperTests extends ESTestCase {
|
|||
x -> localNode,
|
||||
clusterSettings,
|
||||
new ClusterConnectionManager(Settings.EMPTY, capturingTransport, threadPool.getThreadContext()),
|
||||
taskManger,
|
||||
Tracer.NOOP
|
||||
taskManger
|
||||
);
|
||||
JoinHelper joinHelper = new JoinHelper(
|
||||
null,
|
||||
|
|
|
@ -23,7 +23,6 @@ import org.elasticsearch.common.settings.Settings;
|
|||
import org.elasticsearch.common.transport.TransportAddress;
|
||||
import org.elasticsearch.common.util.concurrent.DeterministicTaskQueue;
|
||||
import org.elasticsearch.tasks.TaskManager;
|
||||
import org.elasticsearch.telemetry.tracing.Tracer;
|
||||
import org.elasticsearch.test.ESTestCase;
|
||||
import org.elasticsearch.test.MockLog;
|
||||
import org.elasticsearch.test.junit.annotations.TestLogging;
|
||||
|
@ -235,8 +234,7 @@ public class PeerFinderTests extends ESTestCase {
|
|||
boundTransportAddress -> localNode,
|
||||
null,
|
||||
connectionManager,
|
||||
new TaskManager(settings, threadPool, emptySet()),
|
||||
Tracer.NOOP
|
||||
new TaskManager(settings, threadPool, emptySet())
|
||||
);
|
||||
|
||||
transportService.start();
|
||||
|
|
|
@ -103,7 +103,6 @@ import org.elasticsearch.indices.ShardLimitValidator;
|
|||
import org.elasticsearch.indices.TestIndexNameExpressionResolver;
|
||||
import org.elasticsearch.snapshots.EmptySnapshotsInfoService;
|
||||
import org.elasticsearch.tasks.TaskManager;
|
||||
import org.elasticsearch.telemetry.tracing.Tracer;
|
||||
import org.elasticsearch.test.ClusterServiceUtils;
|
||||
import org.elasticsearch.test.gateway.TestGatewayAllocator;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
|
@ -234,8 +233,7 @@ public class ClusterStateChanges {
|
|||
.address(boundAddress.publishAddress())
|
||||
.build(),
|
||||
clusterSettings,
|
||||
Collections.emptySet(),
|
||||
Tracer.NOOP
|
||||
Collections.emptySet()
|
||||
) {
|
||||
@Override
|
||||
public Transport.Connection getConnection(DiscoveryNode node) {
|
||||
|
|
|
@ -31,7 +31,6 @@ import org.elasticsearch.core.TimeValue;
|
|||
import org.elasticsearch.core.Tuple;
|
||||
import org.elasticsearch.tasks.TaskId;
|
||||
import org.elasticsearch.tasks.TaskManager;
|
||||
import org.elasticsearch.telemetry.tracing.Tracer;
|
||||
import org.elasticsearch.test.ESTestCase;
|
||||
import org.elasticsearch.test.MockLog;
|
||||
import org.elasticsearch.test.TransportVersionUtils;
|
||||
|
@ -114,8 +113,7 @@ public class InboundHandlerTests extends ESTestCase {
|
|||
(request, channel, task) -> channelCaptor.set(channel),
|
||||
EsExecutors.DIRECT_EXECUTOR_SERVICE,
|
||||
false,
|
||||
true,
|
||||
Tracer.NOOP
|
||||
true
|
||||
);
|
||||
requestHandlers.registerHandler(registry);
|
||||
|
||||
|
@ -166,8 +164,7 @@ public class InboundHandlerTests extends ESTestCase {
|
|||
},
|
||||
EsExecutors.DIRECT_EXECUTOR_SERVICE,
|
||||
false,
|
||||
true,
|
||||
Tracer.NOOP
|
||||
true
|
||||
);
|
||||
requestHandlers.registerHandler(registry);
|
||||
String requestValue = randomAlphaOfLength(10);
|
||||
|
|
|
@ -22,7 +22,6 @@ import org.elasticsearch.common.transport.BoundTransportAddress;
|
|||
import org.elasticsearch.core.Nullable;
|
||||
import org.elasticsearch.core.Tuple;
|
||||
import org.elasticsearch.tasks.TaskManager;
|
||||
import org.elasticsearch.telemetry.tracing.Tracer;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.CloseableConnection;
|
||||
import org.elasticsearch.transport.ClusterConnectionManager;
|
||||
|
@ -74,8 +73,7 @@ public class MockTransport extends StubbableTransport {
|
|||
localNodeFactory,
|
||||
clusterSettings,
|
||||
connectionManager,
|
||||
new TaskManager(settings, threadPool, taskHeaders),
|
||||
Tracer.NOOP
|
||||
new TaskManager(settings, threadPool, taskHeaders)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -296,8 +296,7 @@ public class MockTransportService extends TransportService {
|
|||
localNodeFactory,
|
||||
clusterSettings,
|
||||
new StubbableConnectionManager(new ClusterConnectionManager(settings, transport, threadPool.getThreadContext())),
|
||||
taskManager,
|
||||
Tracer.NOOP
|
||||
taskManager
|
||||
);
|
||||
this.original = transport.getDelegate();
|
||||
this.testExecutor = EsExecutors.newScaling(
|
||||
|
|
|
@ -23,7 +23,6 @@ import org.elasticsearch.common.util.concurrent.DeterministicTaskQueue;
|
|||
import org.elasticsearch.core.Nullable;
|
||||
import org.elasticsearch.core.Releasables;
|
||||
import org.elasticsearch.tasks.TaskManager;
|
||||
import org.elasticsearch.telemetry.tracing.Tracer;
|
||||
import org.elasticsearch.test.transport.MockTransport;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
|
||||
|
@ -76,8 +75,7 @@ public abstract class DisruptableMockTransport extends MockTransport {
|
|||
interceptor,
|
||||
localNodeFactory,
|
||||
clusterSettings,
|
||||
new TaskManager(settings, threadPool, taskHeaders),
|
||||
Tracer.NOOP
|
||||
new TaskManager(settings, threadPool, taskHeaders)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
|
|||
import org.elasticsearch.mocksocket.MockSocket;
|
||||
import org.elasticsearch.tasks.TaskManager;
|
||||
import org.elasticsearch.telemetry.metric.MeterRegistry;
|
||||
import org.elasticsearch.telemetry.tracing.Tracer;
|
||||
import org.elasticsearch.test.ESTestCase;
|
||||
import org.elasticsearch.threadpool.DefaultBuiltInExecutorBuilders;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
|
@ -111,8 +110,7 @@ public final class SecurityNetty4HeaderSizeLimitTests extends ESTestCase {
|
|||
(request, channel, task) -> channel.sendResponse(ActionResponse.Empty.INSTANCE),
|
||||
EsExecutors.DIRECT_EXECUTOR_SERVICE,
|
||||
false,
|
||||
true,
|
||||
Tracer.NOOP
|
||||
true
|
||||
)
|
||||
);
|
||||
securityNettyTransport.start();
|
||||
|
|
Loading…
Reference in New Issue