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

refactor metrics let it initialize by configuration #1245

Merged
merged 1 commit into from
Jul 2, 2019

Conversation

zhengyangyong
Copy link
Contributor

Signed-off-by: zhengyangyong yangyong.zheng@qq.com

Ⅰ. Describe what this PR did

This pr refactor metrics in order to makes it works same as config or discovery loading mechanism.
now we can init it by config :

## metrics settings
metrics {
  registry-type = "compact"
  # multi exporters use comma divided
  exporter-list = "prometheus"
  exporter-prometheus-port = 9898
}

NOTICE: metrics is an optional feature so it will not configured by default, that means no metrics data is collecting and exporting by default even seata-metrics-all dependency had imported in server pom.

For more information, please refer to https://github.com/zhengyangyong/seata/blob/metrics_tc_improve/metrics/README.md

Ⅱ. Does this pull request fix one issue?

#384

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

https://seata.io/zh-cn/docs/ops/operation.html (need update later)

Ⅴ. Special notes for reviews

@codecov-io
Copy link

codecov-io commented Jun 26, 2019

Codecov Report

Merging #1245 into develop will decrease coverage by 4.1%.
The diff coverage is 100%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1245      +/-   ##
=============================================
- Coverage      49.47%   45.36%   -4.11%     
+ Complexity      1651     1511     -140     
=============================================
  Files            326      256      -70     
  Lines          11439    10354    -1085     
  Branches        1415     1339      -76     
=============================================
- Hits            5659     4697     -962     
+ Misses          5153     5073      -80     
+ Partials         627      584      -43
Impacted Files Coverage Δ Complexity Δ
...java/io/seata/server/metrics/MeterIdConstants.java 96.55% <ø> (ø) 1 <0> (ø) ⬇️
...ava/io/seata/server/metrics/MetricsSubscriber.java 73.52% <ø> (ø) 6 <0> (ø) ⬇️
...n/java/io/seata/server/metrics/MetricsManager.java 81.81% <100%> (ø) 5 <1> (ø) ⬇️
...java/io/seata/core/protocol/RegisterRMRequest.java 56.06% <0%> (-43.94%) 8% <0%> (+2%)
.../seata/core/protocol/AbstractIdentifyResponse.java 45.83% <0%> (-35.65%) 4% <0%> (ø)
.../io/seata/core/protocol/AbstractResultMessage.java 66.03% <0%> (-33.97%) 14% <0%> (+9%)
...rotocol/transaction/AbstractBranchEndResponse.java 65.62% <0%> (-22.84%) 10% <0%> (+5%)
...core/protocol/transaction/GlobalBeginResponse.java 77.77% <0%> (-22.23%) 8% <0%> (+2%)
...protocol/transaction/AbstractBranchEndRequest.java 68.31% <0%> (-16.54%) 14% <0%> (+7%)
...n/java/io/seata/core/protocol/AbstractMessage.java 15.25% <0%> (-6.18%) 5% <0%> (+3%)
... and 102 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 735f409...fb994ae. Read the comment docs.

@xingfudeshi
Copy link
Member

@zhengyangyong Please resolve conflicting files.

Signed-off-by: zhengyangyong <yangyong.zheng@qq.com>
@zhengyangyong
Copy link
Contributor Author

Done

@slievrly slievrly self-requested a review July 1, 2019 04:36
Copy link
Contributor

@CoffeeLatte007 CoffeeLatte007 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@xingfudeshi xingfudeshi left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

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

LGTM

@slievrly slievrly merged commit 55adfef into apache:develop Jul 2, 2019
@leizhiyuan leizhiyuan modified the milestone: 0.7.0 Jul 10, 2019
nick-tan pushed a commit to nick-tan/seata that referenced this pull request Jul 12, 2019
Signed-off-by: zhengyangyong <yangyong.zheng@qq.com>
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.

None yet

6 participants