File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
gax-java/gax/src/main/java/com/google/api/gax Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -281,13 +281,11 @@ public static ClientContext create(StubSettings settings) throws IOException {
281281 if (apiTracerFactory instanceof SpanTracerFactory ) {
282282 apiTracerFactory = apiTracerFactory .withContext (apiTracerContext );
283283 }
284- if (com .google .api .gax .logging .LoggingUtils .isLoggingEnabled ()) {
285- com .google .api .gax .tracing .ApiTracerFactory loggingTracerFactory =
286- new com .google .api .gax .tracing .LoggingTracerFactory ().withContext (apiTracerContext );
287- apiTracerFactory =
288- new com .google .api .gax .tracing .CompositeTracerFactory (
289- apiTracerFactory , loggingTracerFactory );
290- }
284+ com .google .api .gax .tracing .ApiTracerFactory loggingTracerFactory =
285+ new com .google .api .gax .tracing .LoggingTracerFactory ().withContext (apiTracerContext );
286+ apiTracerFactory =
287+ new com .google .api .gax .tracing .CompositeTracerFactory (
288+ apiTracerFactory , loggingTracerFactory );
291289
292290 return newBuilder ()
293291 .setBackgroundResources (backgroundResources .build ())
Original file line number Diff line number Diff line change @@ -52,7 +52,8 @@ public Scope inScope() {
5252 scopes [i ] = tracers .get (i ).inScope ();
5353 }
5454 return () -> {
55- for (Scope scope : scopes ) {
55+ for (int i = scopes .length - 1 ; i >= 0 ; i --) {
56+ Scope scope = scopes [i ];
5657 if (scope != null ) {
5758 scope .close ();
5859 }
You can’t perform that action at this time.
0 commit comments