Skip to content

Commit

Permalink
Add tracer for getHttpTransports
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Liang <jiallian@amazon.com>
  • Loading branch information
RyanL1997 committed Sep 8, 2023
1 parent 72c6186 commit 471fce0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
import org.opensearch.security.user.User;
import org.opensearch.security.user.UserService;
import org.opensearch.tasks.Task;
import org.opensearch.telemetry.tracing.Tracer;
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.transport.RemoteClusterService;
import org.opensearch.transport.Transport;
Expand Down Expand Up @@ -860,7 +861,8 @@ public Map<String, Supplier<HttpServerTransport>> getHttpTransports(
NamedXContentRegistry xContentRegistry,
NetworkService networkService,
Dispatcher dispatcher,
ClusterSettings clusterSettings
ClusterSettings clusterSettings,
Tracer tracer
) {

if (SSLConfig.isSslOnlyMode()) {
Expand All @@ -873,7 +875,8 @@ public Map<String, Supplier<HttpServerTransport>> getHttpTransports(
xContentRegistry,
networkService,
dispatcher,
clusterSettings
clusterSettings,
tracer
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
import org.opensearch.security.ssl.transport.SecuritySSLNettyTransport;
import org.opensearch.security.ssl.transport.SecuritySSLTransportInterceptor;
import org.opensearch.security.ssl.util.SSLConfigConstants;
import org.opensearch.telemetry.tracing.Tracer;
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.transport.SharedGroupFactory;
import org.opensearch.transport.Transport;
Expand Down Expand Up @@ -242,7 +243,8 @@ public Map<String, Supplier<HttpServerTransport>> getHttpTransports(
NamedXContentRegistry xContentRegistry,
NetworkService networkService,
Dispatcher dispatcher,
ClusterSettings clusterSettings
ClusterSettings clusterSettings,
Tracer tracer
) {

if (!client && httpSSLEnabled) {
Expand All @@ -264,7 +266,8 @@ public Map<String, Supplier<HttpServerTransport>> getHttpTransports(
validatingDispatcher,
NOOP_SSL_EXCEPTION_HANDLER,
clusterSettings,
sharedGroupFactory
sharedGroupFactory,
tracer
);

return Collections.singletonMap("org.opensearch.security.ssl.http.netty.SecuritySSLNettyHttpServerTransport", () -> sgsnht);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.opensearch.http.netty4.Netty4HttpServerTransport;
import org.opensearch.security.ssl.SecurityKeyStore;
import org.opensearch.security.ssl.SslExceptionHandler;
import org.opensearch.telemetry.tracing.Tracer;
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.transport.SharedGroupFactory;

Expand All @@ -56,7 +57,8 @@ public SecuritySSLNettyHttpServerTransport(
final ValidatingDispatcher dispatcher,
final SslExceptionHandler errorHandler,
ClusterSettings clusterSettings,
SharedGroupFactory sharedGroupFactory
SharedGroupFactory sharedGroupFactory,
Tracer tracer
) {
super(settings, networkService, bigArrays, threadPool, namedXContentRegistry, dispatcher, clusterSettings, sharedGroupFactory);
this.sks = sks;
Expand Down

0 comments on commit 471fce0

Please sign in to comment.