Skip to content

Commit

Permalink
Add tracer to getTransports
Browse files Browse the repository at this point in the history
Signed-off-by: Gagan Juneja <[email protected]>
  • Loading branch information
Gagan Juneja committed Oct 5, 2023
1 parent e7713ba commit e910d0d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
import org.opensearch.repositories.RepositoriesService;
import org.opensearch.rest.RestController;
import org.opensearch.script.ScriptService;
import org.opensearch.telemetry.tracing.Tracer;
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.transport.Transport;
import org.opensearch.transport.TransportInterceptor;
Expand Down Expand Up @@ -369,7 +370,8 @@ public Map<String, Supplier<Transport>> getTransports(
PageCacheRecycler pageCacheRecycler,
CircuitBreakerService circuitBreakerService,
NamedWriteableRegistry namedWriteableRegistry,
NetworkService networkService) {
NetworkService networkService,
Tracer tracer) {
OpenSearchResources.INSTANCE.setSettings(settings);
OpenSearchResources.INSTANCE.setCircuitBreakerService(circuitBreakerService);
return Collections.emptyMap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import org.opensearch.plugins.ActionPlugin.ActionHandler;
import org.opensearch.rest.RestController;
import org.opensearch.rest.RestHandler;
import org.opensearch.telemetry.tracing.noop.NoopTracer;
import org.opensearch.test.OpenSearchTestCase;
import org.opensearch.threadpool.TestThreadPool;
import org.opensearch.threadpool.ThreadPool;
Expand Down Expand Up @@ -154,7 +155,14 @@ public void testCreateComponents() {
@Test
public void testGetTransports() {
Map<String, Supplier<Transport>> map =
plugin.getTransports(settings, threadPool, null, circuitBreakerService, null, null);
plugin.getTransports(
settings,
threadPool,
null,
circuitBreakerService,
null,
null,
NoopTracer.INSTANCE);
assertEquals(0, map.size());
assertEquals(settings, OpenSearchResources.INSTANCE.getSettings());
assertEquals(
Expand Down

0 comments on commit e910d0d

Please sign in to comment.