From 8b6f2d7dc355a2e5508b40b9e1cdfa5500736852 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Thu, 5 Oct 2023 17:58:46 -0400 Subject: [PATCH] [Backport 2.11] Add tracer to Transport (#3469) Backport bfba97ae932b1397b3389d7b14ccdec3860dbd2e from #3463. Signed-off-by: Gagan Juneja Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] Co-authored-by: Gagan Juneja --- .../opensearch/security/OpenSearchSecurityPlugin.java | 9 ++++++--- .../security/ssl/OpenSearchSecuritySSLPlugin.java | 6 ++++-- .../ssl/transport/SecuritySSLNettyTransport.java | 7 +++++-- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/opensearch/security/OpenSearchSecurityPlugin.java b/src/main/java/org/opensearch/security/OpenSearchSecurityPlugin.java index 458144560b..ac68088387 100644 --- a/src/main/java/org/opensearch/security/OpenSearchSecurityPlugin.java +++ b/src/main/java/org/opensearch/security/OpenSearchSecurityPlugin.java @@ -808,7 +808,8 @@ public Map> getTransports( PageCacheRecycler pageCacheRecycler, CircuitBreakerService circuitBreakerService, NamedWriteableRegistry namedWriteableRegistry, - NetworkService networkService + NetworkService networkService, + Tracer tracer ) { Map> transports = new HashMap>(); @@ -819,7 +820,8 @@ public Map> getTransports( pageCacheRecycler, circuitBreakerService, namedWriteableRegistry, - networkService + networkService, + tracer ); } @@ -837,7 +839,8 @@ public Map> getTransports( sks, evaluateSslExceptionHandler(), sharedGroupFactory, - SSLConfig + SSLConfig, + tracer ) ); } diff --git a/src/main/java/org/opensearch/security/ssl/OpenSearchSecuritySSLPlugin.java b/src/main/java/org/opensearch/security/ssl/OpenSearchSecuritySSLPlugin.java index bff2cf02d5..18ec7457e9 100644 --- a/src/main/java/org/opensearch/security/ssl/OpenSearchSecuritySSLPlugin.java +++ b/src/main/java/org/opensearch/security/ssl/OpenSearchSecuritySSLPlugin.java @@ -315,7 +315,8 @@ public Map> getTransports( PageCacheRecycler pageCacheRecycler, CircuitBreakerService circuitBreakerService, NamedWriteableRegistry namedWriteableRegistry, - NetworkService networkService + NetworkService networkService, + Tracer tracer ) { Map> transports = new HashMap>(); @@ -333,7 +334,8 @@ public Map> getTransports( sks, NOOP_SSL_EXCEPTION_HANDLER, sharedGroupFactory, - SSLConfig + SSLConfig, + tracer ) ); diff --git a/src/main/java/org/opensearch/security/ssl/transport/SecuritySSLNettyTransport.java b/src/main/java/org/opensearch/security/ssl/transport/SecuritySSLNettyTransport.java index ad4ebec1c5..7aeebdaf9f 100644 --- a/src/main/java/org/opensearch/security/ssl/transport/SecuritySSLNettyTransport.java +++ b/src/main/java/org/opensearch/security/ssl/transport/SecuritySSLNettyTransport.java @@ -59,6 +59,7 @@ import org.opensearch.security.ssl.util.SSLConfigConstants; import org.opensearch.security.ssl.util.SSLConnectionTestResult; import org.opensearch.security.ssl.util.SSLConnectionTestUtil; +import org.opensearch.telemetry.tracing.Tracer; import org.opensearch.threadpool.ThreadPool; import org.opensearch.transport.SharedGroupFactory; import org.opensearch.transport.TcpChannel; @@ -82,7 +83,8 @@ public SecuritySSLNettyTransport( final SecurityKeyStore ossks, final SslExceptionHandler errorHandler, SharedGroupFactory sharedGroupFactory, - final SSLConfig SSLConfig + final SSLConfig SSLConfig, + final Tracer tracer ) { super( settings, @@ -92,7 +94,8 @@ public SecuritySSLNettyTransport( pageCacheRecycler, namedWriteableRegistry, circuitBreakerService, - sharedGroupFactory + sharedGroupFactory, + tracer ); this.ossks = ossks;