conghuhu commented on code in PR #13818:
URL: https://github.com/apache/dubbo/pull/13818#discussion_r1513672126


##########
dubbo-spring-boot/dubbo-spring-boot-starters/observability/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/observability/autoconfigure/otel/OpenTelemetryAutoConfiguration.java:
##########
@@ -87,14 +84,14 @@ io.opentelemetry.api.OpenTelemetry openTelemetry(
     @Bean
     @ConditionalOnMissingBean
     io.opentelemetry.sdk.trace.SdkTracerProvider otelSdkTracerProvider(
+            Environment environment,
             ObjectProvider<io.opentelemetry.sdk.trace.SpanProcessor> 
spanProcessors,
             io.opentelemetry.sdk.trace.samplers.Sampler sampler) {
-        String applicationName = moduleModel
-                .getApplicationModel()
-                .getApplicationConfigManager()
-                .getApplication()
-                .map(ApplicationConfig::getName)
-                .orElse(DEFAULT_APPLICATION_NAME);
+        String applicationName = 
dubboConfigProperties.getApplication().getName();
+        if (StringUtils.isBlank(applicationName)) {

Review Comment:
   DubboConfigProperties contains `dubbo.application.name`, which defaults to 
reading the name of the dubbo. If it cannot be obtained, read the name of 
spring. If none of them are available, take the default value of 
`unknown.dubo_service`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to