@@ -106,9 +106,9 @@ final class OpenTelemetryTracingModule {
106106 .setInstrumentationVersion (IMPLEMENTATION_VERSION )
107107 .build ();
108108 this .contextPropagators = checkNotNull (openTelemetry .getPropagators (), "contextPropagators" );
109- this . otelLogger = openTelemetry . getLogsBridge (). loggerBuilder ( "grpc-java-client-scope" )
110- . setInstrumentationVersion ( "1.0.0" )
111- . build ( );
109+
110+ // 3. Get a Logger from the Bridge API
111+ this . otelLogger = openTelemetry . getLogsBridge (). get ( "io.grpc.opentelemetry" );
112112 }
113113
114114 @ VisibleForTesting
@@ -121,7 +121,7 @@ Tracer getTracer() {
121121 */
122122 @ VisibleForTesting
123123 CallAttemptsTracerFactory newClientCallTracer (Span clientSpan , MethodDescriptor <?, ?> method ) {
124- return new CallAttemptsTracerFactory (clientSpan , method , otelLogger );
124+ return new CallAttemptsTracerFactory (clientSpan , method );
125125 }
126126
127127 /**
@@ -147,14 +147,11 @@ final class CallAttemptsTracerFactory extends ClientStreamTracer.Factory {
147147 volatile int callEnded ;
148148 private final Span clientSpan ;
149149 private final String fullMethodName ;
150- private final io .opentelemetry .api .logs .Logger otelLogger ;
151150
152- CallAttemptsTracerFactory (Span clientSpan , MethodDescriptor <?, ?> method ,
153- io .opentelemetry .api .logs .Logger otelLogger ) {
151+ CallAttemptsTracerFactory (Span clientSpan , MethodDescriptor <?, ?> method ) {
154152 checkNotNull (method , "method" );
155153 this .fullMethodName = checkNotNull (method .getFullMethodName (), "fullMethodName" );
156154 this .clientSpan = checkNotNull (clientSpan , "clientSpan" );
157- this .otelLogger = otelLogger ;
158155 }
159156
160157 @ Override
0 commit comments