Skip to content

Conversation

@simzyoo
Copy link
Contributor

@simzyoo simzyoo commented Jun 27, 2025

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

1.Server metrics add global retry statuses, including GlobalStatus.CommitRetrying, GlobalStatus.RollbackRetrying, and GlobalStatus.TimeoutRollbackRetrying.
2.The collected data for the above statuses now includes information on transactionId and transactionName.

Ⅱ. Does this pull request fix one issue?

fixes #7447

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

liangzaiwei added 5 commits June 27, 2025 11:54
# Conflicts:
#	metrics/seata-metrics-api/src/main/java/org/apache/seata/metrics/IdConstants.java
#	server/src/main/java/org/apache/seata/server/metrics/MeterIdConstants.java
@codecov
Copy link

codecov bot commented Jun 27, 2025

Codecov Report

Attention: Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.

Project coverage is 60.33%. Comparing base (208c2cd) to head (b6118a5).

Files with missing lines Patch % Lines
...apache/seata/server/metrics/MetricsSubscriber.java 86.66% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x    #7478      +/-   ##
============================================
+ Coverage     60.30%   60.33%   +0.03%     
  Complexity      658      658              
============================================
  Files          1281     1281              
  Lines         48281    48308      +27     
  Branches       5676     5676              
============================================
+ Hits          29114    29146      +32     
+ Misses        16557    16554       -3     
+ Partials       2610     2608       -2     
Files with missing lines Coverage Δ
.../apache/seata/server/metrics/MeterIdConstants.java 100.00% <100.00%> (ø)
...apache/seata/server/metrics/MetricsSubscriber.java 71.90% <86.66%> (+2.08%) ⬆️

... and 6 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@funky-eyes funky-eyes changed the title optimize:metrics add retry status optimize: metrics add retry status Jun 27, 2025

String APP_ID_KEY = "applicationId";

String TRANSACTION_ID_KEY = "transactionId";
Copy link
Contributor

Choose a reason for hiding this comment

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

ID is a non-enumerable variable and cannot be used as a Prometheus monitoring metric. Otherwise, it will cause Prometheus cache data to inflate infinitely, leading to full GC and ultimately application OOM.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

明白,我改一下。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已处理,辛苦抽空再帮忙看看

@funky-eyes funky-eyes added this to the 2.5.0 milestone Jun 27, 2025
Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

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

LGTM

@funky-eyes
Copy link
Contributor

If you're using the DingTalk app, please send your DingTalk account to my email at [email protected], and I will invite you to join the Seata developer group

@funky-eyes
Copy link
Contributor

Run 'mvn spotless:apply' to fix these violations.

@simzyoo
Copy link
Contributor Author

simzyoo commented Jun 27, 2025

Run 'mvn spotless:apply' to fix these violations.

done

@funky-eyes funky-eyes merged commit 159e316 into apache:2.x Jun 28, 2025
10 checks passed
slievrly pushed a commit to slievrly/fescar that referenced this pull request Oct 21, 2025
YvCeung pushed a commit to YvCeung/incubator-seata that referenced this pull request Dec 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature:希望在metrics中增加对提交重试、回滚重试的采集

2 participants