Skip to content

Commit

Permalink
Fix: added missing Tracer. (#942)
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock authored Sep 26, 2023
1 parent ebfdab5 commit 5bd7396
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/main/java/org/opensearch/sdk/NettyTransport.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.opensearch.sdk.ssl.SSLConfigConstants;
import org.opensearch.sdk.ssl.SSLNettyTransport;
import org.opensearch.sdk.ssl.SslKeyStore;
import org.opensearch.telemetry.tracing.noop.NoopTracer;
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.transport.SharedGroupFactory;
import org.opensearch.transport.TransportInterceptor;
Expand Down Expand Up @@ -120,7 +121,8 @@ public TransportService initializeExtensionTransportService(Settings settings, T
randomBase64UUID()
),
null,
emptySet()
emptySet(),
NoopTracer.INSTANCE
);
extensionsRunner.startTransportService(transportService);
return transportService;
Expand Down
6 changes: 4 additions & 2 deletions src/test/java/org/opensearch/sdk/TestExtensionsRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.opensearch.sdk.handlers.ExtensionsInitRequestHandler;
import org.opensearch.sdk.handlers.ExtensionsRestRequestHandler;
import org.opensearch.sdk.rest.ExtensionRestPathRegistry;
import org.opensearch.telemetry.tracing.noop.NoopTracer;
import org.opensearch.test.OpenSearchTestCase;
import org.opensearch.transport.Transport;
import org.opensearch.transport.TransportService;
Expand Down Expand Up @@ -92,7 +93,8 @@ public void setUp() throws Exception {
TransportService.NOOP_TRANSPORT_INTERCEPTOR,
x -> null,
null,
Collections.emptySet()
Collections.emptySet(),
NoopTracer.INSTANCE
)
)
);
Expand Down Expand Up @@ -136,7 +138,7 @@ public void testHandleExtensionInitRequest() throws UnknownHostException {

doNothing().when(sdkTransportService.getTransportService()).connectToNodeAsExtension(sourceNode, "opensearch-sdk-1");

InitializeExtensionRequest extensionInitRequest = new InitializeExtensionRequest(sourceNode, extension);
InitializeExtensionRequest extensionInitRequest = new InitializeExtensionRequest(sourceNode, extension, "test");

InitializeExtensionResponse response = extensionsInitRequestHandler.handleExtensionInitRequest(extensionInitRequest);
// Test if name and unique ID are set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.opensearch.sdk.action.SDKActionModule;
import org.opensearch.sdk.action.TestSDKActionModule;
import org.opensearch.sdk.handlers.AcknowledgedResponseHandler;
import org.opensearch.telemetry.tracing.noop.NoopTracer;
import org.opensearch.test.OpenSearchTestCase;
import org.opensearch.transport.Transport;
import org.opensearch.transport.TransportService;
Expand Down Expand Up @@ -60,7 +61,8 @@ public void setUp() throws Exception {
TransportService.NOOP_TRANSPORT_INTERCEPTOR,
x -> null,
null,
Collections.emptySet()
Collections.emptySet(),
NoopTracer.INSTANCE
)
);
this.opensearchNode = new DiscoveryNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.opensearch.sdk.ExtensionsRunner;
import org.opensearch.sdk.ExtensionsRunnerForTest;
import org.opensearch.sdk.SDKTransportService;
import org.opensearch.telemetry.tracing.noop.NoopTracer;
import org.opensearch.test.OpenSearchTestCase;
import org.opensearch.transport.Transport;
import org.opensearch.transport.TransportService;
Expand Down Expand Up @@ -55,7 +56,8 @@ public void setUp() throws Exception {
TransportService.NOOP_TRANSPORT_INTERCEPTOR,
x -> null,
null,
Collections.emptySet()
Collections.emptySet(),
NoopTracer.INSTANCE
)
)
);
Expand Down

0 comments on commit 5bd7396

Please sign in to comment.