Skip to content

Commit 93f2ffb

Browse files
committed
Optimize codes
1 parent f5fafc0 commit 93f2ffb

File tree

1 file changed

+3
-5
lines changed
  • instrumentation/apache-dubbo-2.7/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/apachedubbo/v2_7

1 file changed

+3
-5
lines changed

instrumentation/apache-dubbo-2.7/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/apachedubbo/v2_7/TracingFilter.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,10 @@ public Result invoke(Invoker<?> invoker, Invocation invocation) {
4141
}
4242

4343
Instrumenter<DubboRequest, Result> instrumenter;
44-
boolean isServer = rpcContext.isProviderSide();
45-
if (this.clientInstrumenter != null && this.serverInstrumenter != null) {
46-
instrumenter = isServer ? serverInstrumenter : clientInstrumenter;
44+
if (clientInstrumenter != null && serverInstrumenter != null) {
45+
instrumenter = rpcContext.isProviderSide() ? serverInstrumenter : clientInstrumenter;
4746
} else {
48-
instrumenter =
49-
this.clientInstrumenter != null ? this.clientInstrumenter : this.serverInstrumenter;
47+
instrumenter = clientInstrumenter != null ? clientInstrumenter : serverInstrumenter;
5048
}
5149

5250
Context parentContext = Context.current();

0 commit comments

Comments
 (0)