Skip to content
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

⚡ opt unuse label #13034

Merged
merged 15 commits into from
Sep 25, 2023
Merged

⚡ opt unuse label #13034

merged 15 commits into from
Sep 25, 2023

Conversation

songxiaosheng
Copy link
Member

What is the purpose of the change

remove unuse label : host、ip、gitcommitid
we can get it(host) when discover host such as prometheus use $instance

Brief changelog

Verifying this change

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

Copy link
Member

@AlbumenJ AlbumenJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we only add commitId and hostname tag only in dubbo_application_info_total

@codecov-commenter
Copy link

codecov-commenter commented Sep 13, 2023

Codecov Report

Merging #13034 (9abc5ba) into 3.2 (705d96e) will increase coverage by 1.49%.
Report is 1 commits behind head on 3.2.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                3.2   #13034      +/-   ##
============================================
+ Coverage     67.90%   69.40%   +1.49%     
+ Complexity       20        2      -18     
============================================
  Files          1858     1649     -209     
  Lines         88840    68580   -20260     
  Branches      14288    10002    -4286     
============================================
- Hits          60331    47599   -12732     
+ Misses        23154    16398    -6756     
+ Partials       5355     4583     -772     

see 3507 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

public static Map<String, String> applicationTags(ApplicationModel applicationModel) {
return applicationTags(applicationModel, null);
}

public static Map<String, String> applicationTags(ApplicationModel applicationModel, @Nullable Map<String, String> extraInfo) {
Map<String, String> tags = new HashMap<>();
tags.put(TAG_IP, getLocalHost());
tags.put(TAG_HOSTNAME, getLocalHostName());
tags.put(TAG_APPLICATION_NAME, applicationModel.getApplicationName());
tags.put(TAG_APPLICATION_MODULE, applicationModel.getInternalId());
tags.put(TAG_APPLICATION_VERSION_KEY, version);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version key can be moved into gitTags

@sonarcloud
Copy link

sonarcloud bot commented Sep 23, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@AlbumenJ AlbumenJ merged commit 5903d0b into apache:3.2 Sep 25, 2023
14 checks passed
return tags;
}
public static Map<String, String> hostTags( Map<String, String> tags) {
tags.put(TAG_IP, getLocalHost());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

服务方法的指标数据,ip标签为何移走了?是怎么考量的?
某个方法耗时长,怎么反推定位到是某个ip实例触发的?通过traceId定位么

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ip可以直接查指标来源的

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

明白了,感谢!👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants