-
Notifications
You must be signed in to change notification settings - Fork 26.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix observationsender error & feat: addTracingObservationHandler #13818
Conversation
.map(ApplicationConfig::getName) | ||
.orElse(DEFAULT_APPLICATION_NAME); | ||
String applicationName = dubboConfigProperties.getApplication().getName(); | ||
if (StringUtils.isBlank(applicationName)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If spring.applion.name cannot be queried, can dubbo.applion.name be used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 3.3 #13818 +/- ##
==========================================
- Coverage 38.92% 38.88% -0.04%
==========================================
Files 1895 1897 +2
Lines 79300 79317 +17
Branches 11526 11529 +3
==========================================
- Hits 30865 30846 -19
- Misses 44114 44157 +43
+ Partials 4321 4314 -7 ☔ View full report in Codecov by Sentry. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -101,6 +101,12 @@ | |||
<dependency> | |||
<groupId>org.springframework.boot</groupId> | |||
<artifactId>spring-boot-starter</artifactId> | |||
<exclusions> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's unnecessary because we already excluded the artifact in:
https://github.com/apache/dubbo/blob/3.3/dubbo-demo/dubbo-demo-spring-boot/pom.xml#L50
@@ -101,6 +101,12 @@ | |||
<dependency> | |||
<groupId>org.springframework.boot</groupId> | |||
<artifactId>spring-boot-starter</artifactId> | |||
<exclusions> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto, unnecessary.
@@ -62,15 +62,12 @@ public class OpenTelemetryAutoConfiguration { | |||
/** | |||
* Default value for application name if {@code spring.application.name} is not set. | |||
*/ | |||
private static final String DEFAULT_APPLICATION_NAME = "application"; | |||
private static final String DEFAULT_APPLICATION_NAME = "unknown_dubbo_service"; | |||
|
|||
private final DubboConfigurationProperties dubboConfigProperties; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the comments in DubboConfigurationProperties, it seems that DubboConfigurationProperties is only used to generate JSON metadata.
刚刚发现有个地方改错了,类路径不对,3.3得修下