Skip to content

[Improvement-14243][Metrics] Add user tag of response time of api server#14248

Merged
rickchengx merged 1 commit intoapache:devfrom
rickchengx:Improvement-14243
Jun 1, 2023
Merged

[Improvement-14243][Metrics] Add user tag of response time of api server#14248
rickchengx merged 1 commit intoapache:devfrom
rickchengx:Improvement-14243

Conversation

@rickchengx
Copy link
Contributor

Purpose of the pull request

Brief change log

  • Add user tag of response time of api server

@rickchengx rickchengx self-assigned this Jun 1, 2023
@rickchengx rickchengx added improvement make more easy to user or prompt friendly 3.2.0 for 3.2.0 version document and removed document labels Jun 1, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jun 1, 2023

Codecov Report

Merging #14248 (4948e1b) into dev (7226edd) will increase coverage by 0.03%.
The diff coverage is 78.26%.

❗ Current head 4948e1b differs from pull request most recent head 56097d2. Consider uploading reports for the commit 56097d2 to get more accurate results

@@             Coverage Diff              @@
##                dev   #14248      +/-   ##
============================================
+ Coverage     38.35%   38.38%   +0.03%     
+ Complexity     4471     4470       -1     
============================================
  Files          1229     1229              
  Lines         42936    42892      -44     
  Branches       4765     4760       -5     
============================================
- Hits          16466    16463       -3     
+ Misses        24646    24607      -39     
+ Partials       1824     1822       -2     
Impacted Files Coverage Δ
...er/api/service/impl/MetricsCleanUpServiceImpl.java 12.50% <0.00%> (-1.79%) ⬇️
.../server/master/runner/StateWheelExecuteThread.java 0.50% <ø> (+0.10%) ⬆️
.../server/master/runner/WorkflowExecuteRunnable.java 10.33% <ø> (+0.01%) ⬆️
...dolphinscheduler/api/metrics/ApiServerMetrics.java 84.37% <72.72%> (-5.79%) ⬇️
...e/dolphinscheduler/api/aspect/AccessLogAspect.java 86.95% <100.00%> (+0.59%) ⬆️
...inscheduler/api/service/impl/UsersServiceImpl.java 70.83% <100.00%> (+0.04%) ⬆️

... and 3 files with indirect coverage changes

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

Copy link
Member

@EricGao888 EricGao888 left a comment

Choose a reason for hiding this comment

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

Clean up mechanism example -

public void cleanUpProcessInstanceCountMetricsByDefinitionCode(final String processDefinitionCode) {
for (final String state : processInstanceStates) {
final Counter counter = Metrics.globalRegistry.counter(
"ds.workflow.instance.count",
"state", state,
"process.definition.code", processDefinitionCode);
Metrics.globalRegistry.remove(counter);
}
}

@rickchengx rickchengx force-pushed the Improvement-14243 branch from b7f87f4 to 56097d2 Compare June 1, 2023 06:27
@rickchengx
Copy link
Contributor Author

Clean up mechanism example -

public void cleanUpProcessInstanceCountMetricsByDefinitionCode(final String processDefinitionCode) {
for (final String state : processInstanceStates) {
final Counter counter = Metrics.globalRegistry.counter(
"ds.workflow.instance.count",
"state", state,
"process.definition.code", processDefinitionCode);
Metrics.globalRegistry.remove(counter);
}
}

Thanks for your comment, I've cleaned up the response time metrics when user is deleted.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 1, 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 3 Code Smells

82.6% 82.6% Coverage
0.0% 0.0% Duplication

@rickchengx rickchengx merged commit 8aec384 into apache:dev Jun 1, 2023
zhongjiajie pushed a commit that referenced this pull request Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.2.0 for 3.2.0 version backend document improvement make more easy to user or prompt friendly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement][Metrics] Add user tag of response time of api server

3 participants